I'm using the BluetoothManager private framework in my app and I want to know how can I receive BluetoothManager notifications when the application is in background (ex: Receive the connected/disconected bluetooth notification in background).
Thanks in advance.
Use
// global notification explorer
CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(),
NULL, MyCallBack, NULL, NULL,
CFNotificationSuspensionBehaviorDeliverImmediately);
and receive the notifications:
// global notification callback
void MyCallBack (CFNotificationCenterRef center,void *observer,CFStringRef name,const void object,CFDictionaryRef userInfo)
{
NSLog(@"CallBack:CFN Name:%@ Data:%@", name, userInfo);
}