private Messenger mService = null;
final Messenger mMessenger = new Messenger(new IncomingHandler(this));
- // Preferences
- private AltosDroidPreferences prefs = null;
-
// TeleBT Config data
private AltosConfigData mConfigData = null;
// Local Bluetooth adapter
}
// Initialise preferences
- prefs = new AltosDroidPreferences(this);
- AltosPreferences.init(prefs);
+ AltosDroidPreferences.init(this);
// Set up the window layout
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
}
}
- private void connectDevice(Intent data) {
- // Get the device MAC address
- String address = data.getExtras().getString(DeviceListActivity.EXTRA_DEVICE_ADDRESS);
+ private void connectDevice(String address) {
// Get the BLuetoothDevice object
BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(address);
// Attempt to connect to the device
}
}
+ private void connectDevice(Intent data) {
+ // Get the device MAC address
+ String address = data.getExtras().getString(DeviceListActivity.EXTRA_DEVICE_ADDRESS);
+ connectDevice(address);
+ }
+
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();