Subversion Repositories Projects

Rev

Rev 84 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 84 Rev 92
Line 14... Line 14...
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;
Line 19... Line 22...
19
 
22
 
Line 20... Line 23...
20
import java.util.Random;
23
import java.util.Random;
21
 
24
 
Line 22... Line 25...
22
import android.view.Window;
25
import android.view.Window;
-
 
26
import android.view.WindowManager;
Line 23... Line 27...
23
import android.view.WindowManager;
27
 
24
 
28
//import org.bluez.*;
-
 
29
 
-
 
30
 
-
 
31
public class DUBwise extends Activity
-
 
32
{
-
 
33
    private SharedPreferences mPrefs;
25
import org.bluez.*;
34
    public boolean fullscreen;
26
 
35
    public MKCommunicator mk;
27
public class DUBwise extends Activity
36
 
28
{
37
 
29
    /** Called when the activity is first created. */
38
    /** Called when the activity is first created. */
-
 
39
    @Override
-
 
40
    public void onCreate(Bundle icicle)
-
 
41
    {
-
 
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);
30
    @Override
48
        mk.connect_to("s","test");
31
    public void onCreate(Bundle icicle)
49
        Log.d("DUBWise-V","version " + mk.version.major);
32
    {
50
        if (fullscreen)
-
 
51
          {
Line 33... Line 52...
33
        super.onCreate(icicle);
52
                this.requestWindowFeature(Window.FEATURE_NO_TITLE);
34
                this.requestWindowFeature(Window.FEATURE_NO_TITLE);
-
 
Line -... Line 53...
-
 
53
                this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_NO_STATUS_BAR,
-
 
54
                WindowManager.LayoutParams.FLAG_NO_STATUS_BAR);
-
 
55
          }
-
 
56
       
-
 
57
        setContentView(new DUBwiseView(this));
-
 
58
   
-
 
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
        */
35
        this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_NO_STATUS_BAR,
72
 
36
                          WindowManager.LayoutParams.FLAG_NO_STATUS_BAR);
73
    }