Signed-off-by: Mike Beattie <mike@ethernal.org>
super.onCreate(savedInstanceState);
if(D) Log.e(TAG, "+++ ON CREATE +++");
super.onCreate(savedInstanceState);
if(D) Log.e(TAG, "+++ ON CREATE +++");
+ // Get local Bluetooth adapter
+ mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
+
+ // If the adapter is null, then Bluetooth is not supported
+ if (mBluetoothAdapter == null) {
+ Toast.makeText(this, "Bluetooth is not available", Toast.LENGTH_LONG).show();
+ finish();
+ return;
+ }
+
// Set up the window layout
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
//setContentView(R.layout.main);
// Set up the window layout
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
//setContentView(R.layout.main);
mLatitudeView = (TextView) findViewById(R.id.latitude_value);
mLongitudeView = (TextView) findViewById(R.id.longitude_value);
mLatitudeView = (TextView) findViewById(R.id.latitude_value);
mLongitudeView = (TextView) findViewById(R.id.longitude_value);
- // Get local Bluetooth adapter
- mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
-
- // If the adapter is null, then Bluetooth is not supported
- if (mBluetoothAdapter == null) {
- Toast.makeText(this, "Bluetooth is not available", Toast.LENGTH_LONG).show();
- finish();
- return;
- }
-
// Enable Text to Speech
tts = new TextToSpeech(this, new OnInitListener() {
public void onInit(int status) {
// Enable Text to Speech
tts = new TextToSpeech(this, new OnInitListener() {
public void onInit(int status) {