private boolean mIsBound;
Messenger mService = null;
- final Messenger mMessenger = new Messenger(new IncomingHandler());
+ final Messenger mMessenger = new Messenger(new IncomingHandler(this));
// Name of the connected device
private String mConnectedDeviceName = null;
// User did not enable Bluetooth or an error occured
Log.d(TAG, "BT not enabled");
stopService(new Intent(AltosDroid.this, TelemetryService.class));
- Toast.makeText(this, R.string.bt_not_enabled_leaving, Toast.LENGTH_SHORT).show();
+ Toast.makeText(this, R.string.bt_not_enabled, Toast.LENGTH_SHORT).show();
finish();
}
+ break;
}
}
//Message msg = Message.obtain(null, TelemetryService.MSG_CONNECT_TELEBT);
//msg.obj = device;
//mService.send(msg);
+ if (D) Log.i(TAG, "Connecting to " + device.getName());
mService.send(Message.obtain(null, TelemetryService.MSG_CONNECT, device));
} catch (RemoteException e) {
e.printStackTrace();
}
}
-
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();