Search code examples
androidbluetoothbroadcastreceiver

Does the ACTION_DISCOVERY_FINISHED still come if a call a cancelDiscovery()?


In my android application, I'm looking for a particular bluetooth device. When I found a bluetooth device, I check if it's the one I'm looking for and if it is, I call cancelDiscovery();

My question is : If I cancel the discovery, will I still receive the ACTION_DISCOVERY_FINISHED broadcast or not ?

Thank you !


Solution

  • Yes, as soon as you cancel the discovery ACTION_DISCOVERY_FINISHED broadcast will receive it.