Rev 84 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
84 | ligi | 1 | package org.ligi; |
2 | |||
3 | import android.app.Activity; |
||
4 | import android.os.Bundle; |
||
5 | |||
6 | import android.app.Activity; |
||
7 | import android.os.Bundle; |
||
8 | |||
9 | import android.view.View; |
||
10 | import android.widget.TextView; |
||
11 | |||
12 | |||
13 | import android.app.Activity; |
||
14 | import android.content.Context; |
||
15 | import android.graphics.*; |
||
16 | import android.os.Bundle; |
||
17 | import android.os.*; |
||
18 | import android.view.View; |
||
92 | ligi | 19 | import android.content.*; |
20 | import android.media.*; |
||
21 | import android.util.Log; |
||
84 | ligi | 22 | |
23 | import java.util.Random; |
||
24 | |||
25 | import android.view.Window; |
||
26 | import android.view.WindowManager; |
||
27 | |||
92 | ligi | 28 | //import org.bluez.*; |
84 | ligi | 29 | |
92 | ligi | 30 | |
84 | ligi | 31 | public class DUBwise extends Activity |
32 | { |
||
92 | ligi | 33 | private SharedPreferences mPrefs; |
34 | public boolean fullscreen; |
||
35 | public MKCommunicator mk; |
||
36 | |||
37 | |||
84 | ligi | 38 | /** Called when the activity is first created. */ |
39 | @Override |
||
40 | public void onCreate(Bundle icicle) |
||
41 | { |
||
42 | super.onCreate(icicle); |
||
92 | ligi | 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 | { |
||
52 | this.requestWindowFeature(Window.FEATURE_NO_TITLE); |
||
53 | this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_NO_STATUS_BAR, |
||
54 | WindowManager.LayoutParams.FLAG_NO_STATUS_BAR); |
||
55 | } |
||
56 | |||
84 | ligi | 57 | setContentView(new DUBwiseView(this)); |
92 | ligi | 58 | |
84 | ligi | 59 | |
60 | } |
||
92 | ligi | 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); |
||
78 | } |
||
84 | ligi | 79 | } |