- if (D) Log.d(TAG, "Connecting to " + address);
- mService.send(Message.obtain(null, TelemetryService.MSG_CONNECT, address));
+ String address = data.getExtras().getString(DeviceListActivity.EXTRA_DEVICE_ADDRESS);
+ String name = data.getExtras().getString(DeviceListActivity.EXTRA_DEVICE_NAME);
+
+ if (D) Log.d(TAG, "Connecting to " + address + name);
+ DeviceAddress a = new DeviceAddress(address, name);
+ mService.send(Message.obtain(null, TelemetryService.MSG_CONNECT, a));