Is it possible to get notified in the Bluz if a phone rings or receives an alert?


#1

Is it possible to setup the Bluz to get notified (to say… Light up an LED) when a paired phone (iOS) rings or receives an e-mail or message?

Thanks!


#2

As with many questions surrounding Apple, that sort of depends.

Apple is weird when it comes to background modes. In a normal app, when you switch apps or lock your phone, your app goes to the background and can’t do anything. There are modes that you can specify to operate in the background, and Bluetooth LE is one of them. However, I am not sure if you can poll other items in this mode, the app only wakes up when Bluetooth LE is received.

So, I am not 100% sure. If Apple allows it, then yes, but I would have to play around with it to know for sure


#3

Would the Immediate Alert client/profile be applicable here?

EDIT: A little searching has revealed that ANCS is what you seek.
https://developer.apple.com/library/ios/documentation/CoreBluetooth/Reference/AppleNotificationCenterServiceSpecification/Specification/Specification.html#//apple_ref/doc/uid/TP40013460-CH1-SW7


#4

Thanks,

I understand the iPhone part… How would I subscribe from bluz to that event in particular??

Any code from the bluz side would be great!!


#5

Ha, excellent point @LukeUSMC! I have been thinking about the app so much that my mind just went straight there. If you only have a hammer, everything looks like a nail…

Yes, ANCS is the way to go here. That isn’t in the current code base, but I am opening an issue for it so I can track it: https://github.com/bluzDK/bluzDK-firmware/issues/9

I will update this thread when I have an example to show.


#6

There is an existing Arduino lib for this. I haven’t looked at all of it but eeprom looks to be heavily used so it will need some porting but not a bad place to start!


#7

Thanks all!

Il give it a tackle once my bluz arrive!


#8

Hi there… Any news??


#9

I had briefly played around with this, Nordic has a good example of using ANCS and a library as part of their driver set. It will just be a matter of merging it in, I don’t have an exact timeline for that though as we are still getting things out the door. Sorry, I wish I could give a little more detail of a schedule, but it is a bit of a crazy time right now!


#10

Thanks for the update… Il be waiting. :blush: