HI Steve
Yes, you should be able to get information about the Bluetooth pairing dialogs at least for the Classic ones, I didn’t try LE, but I’d be surprised if they are any different). But… it probably falls into the “using non-public APIs" category.
If you link against the private BluetoothManager Framework and just access [BluetoothManager sharedInstance],the BluetoothManager connects via the MobileBluetooth Framework to the Bluetooth Server and you’ll get all kinds of application notifications that
start with Bluetooth.
For a quick test, you can drop that into your app:
Class $BluetoothManager =
objc_getClass("BluetoothManager");
[$BluetoothManager sharedInstance];
NSNotificationCenter *notifyCenter = [NSNotificationCenterdefaultCenter];
[notifyCenter
addObserverForName:nil
object:nil
queue:nil
usingBlock:^(NSNotification* notification){
if (![[notification name]
hasPrefix:@"Bluetooth"])
return;
NSLog(@"Notification found with:"
"\r\n name: %@"
"\r\n object: %@"
"\r\n userInfo: %@",
[notification
name],
[notification
object],
[notification
userInfo]);
}];
When I did that, I found the following ones interesting:
"BluetoothAvailabilityChangedNotification"
"BluetoothPairingUserConfirmationNotification"
"BluetoothPairingUserNumericComparisionNotification"
"BluetoothPairingPINRequestNotification"
"BluetoothPairingPassKeyDisplayNotification"
"BluetoothPairingPINResultSuccessNotification"
"BluetoothPairingPINResultFailedNotification"
Best regards,
Matthias
---
Dr. sc. Matthias Ringwald
BlueKitchen GmbH, Zürich
On 13.06.2014, at 21:24, Stephen Jaynes <
email@hidden> wrote:
Hi All,
I have been researching to determine if there is any way programmatically to determine when iOS displays an alert view requesting a pairing code, and to determine how the user responded to the pairing request. The only indication I get is the UIApplicationWillResignActive
notification. If I tap cancel or if I enter an incorrect pairing code I do not get any delegate callback indicating that pairing was unsuccessful.
If anyone knows of any way to detect these occurrences I’d appreciate you letting me know.
Thanks in advance,
Steve Jaynes
Mobile App Developer
IQAir North America, Inc.
Phone: 562-903-7600 x1170
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
This email sent to email@hidden