Dears,
I am designing a notification application. I would like to know what if I want to support both of iOS and Android phone, which example code of ble_app_alert_notification & ble_app_ancs_c I should use it?
The ble_app_alert_notification example uses the Alert Notification Service to get notifications from an Android phone. The Alert Notification Service is defined by the bluetooth spec. An application that sets up a server on the Android phone needs to be running.
Ble_app_ancs_c uses ANCS (Apple Notification Center Service) to get notifications from an iPhone. ANCS runs natively on iOS.
You cannot connect ble_app_alert_notification to an iPhone or ble_app_ancs_c to an Android phone (unless maybe you do some hacks). Therefore, the device should run both the ANCS and ANS and let the phone decide what to use.