I have an issue where BluetoothManager constantly shows the following message in LogCat, even after device Bluetooth has been turned off.
D/BluetoothManager: getConnectedDevices
This causes a problem when I try to search for new devices, the only way I can stop this is to 'force quit' the app. Please see what I have tried below, I've tried a few other things but nothing seems to work.
BluetoothManager btManager = (BluetoothManager) getSystemService(BLUETOOTH_SERVICE);
btManager.getAdapter().cancelDiscovery();
Also,
BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
mBluetoothAdapter.cancelDiscovery();