This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Creating ANCS for Android

Hello,

we have successfully run Nordic chip together with iPhone and we are able to get notifications from iPhone to the embedded device using ANCS via Bluetooth LE.

I understand, that for Android, we can have Android app with Notification Listener and than send the notification to the device via Bluetooth LE, but:, I would like to ask:

please is it possible to "clone" or replicate ANCS on Android, so on embedded device side, we will need to have only one code for handling notifications? (That ANCS code will take care of iOS notifications as well as Androids one).

I am reading articles, that some Android devices cannot be GATT server and advertise.

For example The Nordic app nRF Connect for Mobile on my Nexus 5 with Android 6.0.1 cannot run as a server, but my LG with Android 5.1.1 in the app can be a server.

Also, I have read, that even, if some chips in mobile phones doesn't support GATT server advertising, its not necessary, because first the connection is done traditionally (embedded HW is advertising an is server) and after that, roles are changed and Android is in a role of "server", the same as iPhone in ANCS.

Please do you have any hints in this topic how o make ANCS for Android?

regards tomas zeman

  • Hi Tomas,

    I don't think it's a problem implementing ANCS server on Android. You would need your own app running on Android to create and maintain the server though.

    However, you then would need to follow exactly how the ANCS server works on iOS so that your client on the peripheral side work seamlessly.

    I didn't know that we have trouble with creating server on Nexus 5 running Android 6. Server support is supported pretty early on Android, even from Android 4.3.

    Please be aware that having the ability to advertise (and connect as a peripheral) and acting as a server are 2 separated things. You can be a central and have a server at the same time, it's no problem.

    Many of our customer simply use proprietary profile (UART profile for example) to handle notification on Android, it makes it more simple. The task can also be done with just the client implemented on the phone (using write command/request instead of using notification).

Related