Rev 84 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 84 | Rev 92 | ||
---|---|---|---|
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.*; |
|
- | 20 | import android.media.*; |
|
- | 21 | import android.util.Log; |
|
19 | 22 | ||
20 | import java.util.Random; |
23 | import java.util.Random; |
21 | 24 | ||
22 | import android.view.Window; |
25 | import android.view.Window; |
23 | import android.view.WindowManager; |
26 | import android.view.WindowManager; |
24 | 27 | ||
- | 28 | //import org.bluez.*; |
|
25 | import org.bluez.*; |
29 | |
26 | 30 | ||
27 | public class DUBwise extends Activity |
31 | public class DUBwise extends Activity |
28 | { |
32 | { |
- | 33 | private SharedPreferences mPrefs; |
|
- | 34 | public boolean fullscreen; |
|
- | 35 | public MKCommunicator mk; |
|
- | 36 | ||
- | 37 | ||
29 | /** Called when the activity is first created. */ |
38 | /** Called when the activity is first created. */ |
30 | @Override |
39 | @Override |
31 | public void onCreate(Bundle icicle) |
40 | public void onCreate(Bundle icicle) |
32 | { |
41 | { |
33 | super.onCreate(icicle); |
42 | super.onCreate(icicle); |
- | 43 | SharedPreferences mPrefs = getSharedPreferences("dubwise",0); |
|
- | 44 | fullscreen = mPrefs.getBoolean("fullscreen", true); |
|
- | 45 | ||
- | 46 | Log.d("DUBWise-V","starting"); |
|
- | 47 | mk=new MKCommunicator(this); |
|
- | 48 | mk.connect_to("s","test"); |
|
- | 49 | Log.d("DUBWise-V","version " + mk.version.major); |
|
- | 50 | if (fullscreen) |
|
- | 51 | { |
|
34 | this.requestWindowFeature(Window.FEATURE_NO_TITLE); |
52 | this.requestWindowFeature(Window.FEATURE_NO_TITLE); |
35 | this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_NO_STATUS_BAR, |
53 | this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_NO_STATUS_BAR, |
36 | WindowManager.LayoutParams.FLAG_NO_STATUS_BAR); |
54 | WindowManager.LayoutParams.FLAG_NO_STATUS_BAR); |
- | 55 | } |
|
37 | 56 | ||
38 | setContentView(new DUBwiseView(this)); |
57 | setContentView(new DUBwiseView(this)); |
39 | //super.onCreate(icicle); |
- | |
- | 58 | ||
40 | 59 | ||
- | 60 | } |
|
- | 61 | ||
- | 62 | public void quit() |
|
- | 63 | { |
|
- | 64 | // setContentView(null); |
|
- | 65 | finish(); |
|
- | 66 | // mk=null; |
|
- | 67 | /* |
|
- | 68 | SharedPreferences.Editor ed = getSharedPreferences("dubwise",0).edit(); |
|
- | 69 | ed.putBoolean("fullscreen", true); |
|
- | 70 | ed.commit(); |
|
- | 71 | */ |
|
- | 72 | ||
- | 73 | } |
|
- | 74 | ||
- | 75 | public void log(String msg) |
|
- | 76 | { |
|
- | 77 | Log.d("DUWISE",msg); |
|
41 | } |
78 | } |
42 | } |
79 | } |
43 | 80 |