public List<BluetoothDevice> getConnectedDevices() { if (mService == null) return new ArrayList<BluetoothDevice>(0); return mService.getDevicesMatchingConnectionStates( new int[] { BluetoothProfile.STATE_CONNECTED, BluetoothProfile.STATE_CONNECTING, BluetoothProfile.STATE_DISCONNECTING }); }