Bluetooth On Android: Debuging Startdiscovery()
I'm working on an app that searches for discoverable devices and displays them as buttons. When calling startDiscovery() I would say it works 30% of the time, based on the way I'm
Solution 1:
I confirm this issue.
On some telephones you just need to disable/active BT. You can doit programatically with
mBluetoothAdapter.disable();
mBluetoothAdapter.enable();
On some telephones its not enough ( Samsung S5 ). To detect it, I use timer, and if on end of timeout the change of BT broadcast state (BluetoothAdapter.ACTION_DISCOVERY_STARTED or BluetoothAdapter.ACTION_DISCOVERY_FINISHED ) wasnt received => its sign that BT is not working. Actually I show dialog which propose to user reboot the telephone.
Post a Comment for "Bluetooth On Android: Debuging Startdiscovery()"