BlueKey fires two system wide events that other applications can listen for and act on.

  • com.inburst.bluekey.onDeviceEnter
  • com.inburst.bluekey.onDeviceExit
Registering listeners for the events takes only 3 lines of code :

[code language="js"] NSDistributedNotificationCenter * center = [NSDistributedNotificationCenter defaultCenter]; [center addObserver:self selector:@selector(onDeviceEnter) name:@"com.inburst.bluekey.onDeviceEnter" object:nil];

[center addObserver:self selector:@selector(onDeviceExit) name:@"com.inburst.bluekey.onDeviceExit" object:nil]; [/code]

These events are fired respectively. Note* There is no event fired when a device is initially connected.