private void stopBluetoothListening() { if (bluetoothServiceIntent != null) { activity.stopService(bluetoothServiceIntent); bluetoothServiceIntent = null; } bluetoothMac = null; }