Subversion Repositories Projects

Rev

Details | 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;
129 ligi 35
    public boolean do_sound=true;
36
 
92 ligi 37
    public MKCommunicator mk;
129 ligi 38
    public DUBwiseStatusVoice voice;
92 ligi 39
 
84 ligi 40
    /** Called when the activity is first created. */
41
    @Override
42
    public void onCreate(Bundle icicle)
43
    {
44
        super.onCreate(icicle);
92 ligi 45
        SharedPreferences mPrefs = getSharedPreferences("dubwise",0);
46
        fullscreen = mPrefs.getBoolean("fullscreen", true);
47
 
48
        Log.d("DUBWise-V","starting");
49
        mk=new MKCommunicator(this);
129 ligi 50
        voice=new DUBwiseStatusVoice(this);
92 ligi 51
        mk.connect_to("s","test");
52
        Log.d("DUBWise-V","version " + mk.version.major);
53
        if (fullscreen)
54
          {
129 ligi 55
              //                this.requestWindowFeature(Window.FEATURE_NO_TITLE);
56
              //this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_NO_STATUS_BAR,
57
              //WindowManager.LayoutParams.FLAG_NO_STATUS_BAR);
92 ligi 58
          }
59
 
84 ligi 60
        setContentView(new DUBwiseView(this));
92 ligi 61
 
84 ligi 62
 
63
    }
92 ligi 64
 
65
    public void quit()
66
    {
67
        //      setContentView(null);
68
        finish();
69
        //      mk=null;
70
        /*
71
        SharedPreferences.Editor ed = getSharedPreferences("dubwise",0).edit();
72
        ed.putBoolean("fullscreen", true);
73
        ed.commit();
74
        */
75
 
76
    }
77
 
78
    public void log(String msg)
79
    {
80
        Log.d("DUWISE",msg);
81
    }
84 ligi 82
}