Hi,
Is there a way I can intercept when a user has clicked OK to accept a bluetooth pairing dialog?
Maybe this below, but I don't know if this applies to Bluetooth 2.1 or BLE only (I use 2.1), and bonding is BLE terminology. I already have a service set up to intercept the PAIRING_REQUEST event which occurs when the dialog is presented.
If StartingIntent.Action = "android.bluetooth.device.action.BOND_BONDED" Then
Ok, I'm not getting an event for BOND_BONDED or BOND_BONDING. I am not sure if the intent name is correct or not.
Here's what's in my manifest editor to allow the bonding related intents through:
I've also tried:
Else If StartingIntent.Action = "android.bluetooth.device.action.ACTION_BOND_STATE_CHANGED" Then
but no cigar.. I don't very much about intents, but I was wondering if maybe the ACTION_ in the last part of the above means that the string should actually be:
Else If StartingIntent.Action = "android.bluetooth.device.ACTION_BOND_STATE_CHANGED" Then
could an incorrect intent string be why I'm not intercepting these events?
Note that there are broadcast intents that can only be intercepted with a dynamic filter. You can create dynamic filters with the BroadcastReceiver library.