Rev 92 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 92 | Rev 129 | ||
---|---|---|---|
1 | package org.ligi; |
1 | package org.ligi; |
2 | 2 | ||
3 | import android.app.Activity; |
3 | import android.app.Activity; |
4 | import android.os.Bundle; |
4 | import android.os.Bundle; |
5 | 5 | ||
6 | import android.app.Activity; |
6 | import android.app.Activity; |
7 | import android.os.Bundle; |
7 | import android.os.Bundle; |
8 | 8 | ||
9 | import android.view.View; |
9 | import android.view.View; |
10 | import android.widget.TextView; |
10 | import android.widget.TextView; |
11 | 11 | ||
12 | 12 | ||
13 | import android.app.Activity; |
13 | import android.app.Activity; |
14 | import android.content.Context; |
14 | import android.content.Context; |
15 | import android.graphics.*; |
15 | import android.graphics.*; |
16 | import android.os.Bundle; |
16 | import android.os.Bundle; |
17 | import android.os.*; |
17 | import android.os.*; |
18 | import android.view.View; |
18 | import android.view.View; |
19 | import android.content.*; |
19 | import android.content.*; |
20 | import android.media.*; |
20 | import android.media.*; |
21 | import android.util.Log; |
21 | import android.util.Log; |
22 | 22 | ||
23 | import java.util.Random; |
23 | import java.util.Random; |
24 | 24 | ||
25 | import android.view.Window; |
25 | import android.view.Window; |
26 | import android.view.WindowManager; |
26 | import android.view.WindowManager; |
27 | 27 | ||
28 | //import org.bluez.*; |
28 | //import org.bluez.*; |
29 | 29 | ||
30 | 30 | ||
31 | public class DUBwise extends Activity |
31 | public class DUBwise extends Activity |
32 | { |
32 | { |
33 | private SharedPreferences mPrefs; |
33 | private SharedPreferences mPrefs; |
34 | public boolean fullscreen; |
34 | public boolean fullscreen; |
35 | public MKCommunicator mk; |
35 | public boolean do_sound=true; |
- | 36 | ||
- | 37 | public MKCommunicator mk; |
|
36 | 38 | public DUBwiseStatusVoice voice; |
|
37 | 39 | ||
38 | /** Called when the activity is first created. */ |
40 | /** Called when the activity is first created. */ |
39 | @Override |
41 | @Override |
40 | public void onCreate(Bundle icicle) |
42 | public void onCreate(Bundle icicle) |
41 | { |
43 | { |
42 | super.onCreate(icicle); |
44 | super.onCreate(icicle); |
43 | SharedPreferences mPrefs = getSharedPreferences("dubwise",0); |
45 | SharedPreferences mPrefs = getSharedPreferences("dubwise",0); |
44 | fullscreen = mPrefs.getBoolean("fullscreen", true); |
46 | fullscreen = mPrefs.getBoolean("fullscreen", true); |
45 | 47 | ||
46 | Log.d("DUBWise-V","starting"); |
48 | Log.d("DUBWise-V","starting"); |
47 | mk=new MKCommunicator(this); |
49 | mk=new MKCommunicator(this); |
- | 50 | voice=new DUBwiseStatusVoice(this); |
|
48 | mk.connect_to("s","test"); |
51 | mk.connect_to("s","test"); |
49 | Log.d("DUBWise-V","version " + mk.version.major); |
52 | Log.d("DUBWise-V","version " + mk.version.major); |
50 | if (fullscreen) |
53 | if (fullscreen) |
51 | { |
54 | { |
52 | this.requestWindowFeature(Window.FEATURE_NO_TITLE); |
55 | // this.requestWindowFeature(Window.FEATURE_NO_TITLE); |
53 | this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_NO_STATUS_BAR, |
56 | //this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_NO_STATUS_BAR, |
54 | WindowManager.LayoutParams.FLAG_NO_STATUS_BAR); |
57 | //WindowManager.LayoutParams.FLAG_NO_STATUS_BAR); |
55 | } |
58 | } |
56 | 59 | ||
57 | setContentView(new DUBwiseView(this)); |
60 | setContentView(new DUBwiseView(this)); |
58 | 61 | ||
59 | 62 | ||
60 | } |
63 | } |
61 | 64 | ||
62 | public void quit() |
65 | public void quit() |
63 | { |
66 | { |
64 | // setContentView(null); |
67 | // setContentView(null); |
65 | finish(); |
68 | finish(); |
66 | // mk=null; |
69 | // mk=null; |
67 | /* |
70 | /* |
68 | SharedPreferences.Editor ed = getSharedPreferences("dubwise",0).edit(); |
71 | SharedPreferences.Editor ed = getSharedPreferences("dubwise",0).edit(); |
69 | ed.putBoolean("fullscreen", true); |
72 | ed.putBoolean("fullscreen", true); |
70 | ed.commit(); |
73 | ed.commit(); |
71 | */ |
74 | */ |
72 | 75 | ||
73 | } |
76 | } |
74 | 77 | ||
75 | public void log(String msg) |
78 | public void log(String msg) |
76 | { |
79 | { |
77 | Log.d("DUWISE",msg); |
80 | Log.d("DUWISE",msg); |
78 | } |
81 | } |
79 | } |
82 | } |
80 | 83 |