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

Notification on phone at button press

Hello!

I would like to try the following using my nRF52840 board: press a button on the board and then receive a notification on the phone. And the other way round, press something on the phone and turn on an LED from the board. Therefore, my questions are: 

1. My idea: I read a bit about this and from my perspective, I would have to write some bit in a register which is not temporary and then use this to trigger a notification. But I am not sure which registers I should write in and from what base code to start. Could I ask for your guidance regarding this, please?

2. I tried this alert notification application. It seems very promising, although I am also not so sure about this approach, since the bits which are written while receiving so-called "mails" or "calls" are not used-defined, but rather imposed and not changeable. Am I right?

3. Do you think that this is a good starting point? If yes, should I try to write into those registers from the main program, or do you have another suggestion for other registers?  

Thank you very much and best regards, Marry

Parents
  • Hi Marry

    Kenneth is currently on vacation, and I will handle your case in the mean time. 

    The Alert Notification Service is a good option if you want your device to show what is happening on the phone, such as an incoming phone call or text message, but if you are planning to send custom user defined notifications I would not recommend using ANS. 

    In this case it is a much better option to use the blinky example, as Kenneth mentioned earlier. 

    The Android blinky app does not show notifications, but we provide you the source code here so you can change the app to your requirements. 

    For information on how to implement notification in Android you can have a look at this article:
    https://developer.android.com/training/notify-user/build-notification

    Best regards
    Torbjørn

Reply
  • Hi Marry

    Kenneth is currently on vacation, and I will handle your case in the mean time. 

    The Alert Notification Service is a good option if you want your device to show what is happening on the phone, such as an incoming phone call or text message, but if you are planning to send custom user defined notifications I would not recommend using ANS. 

    In this case it is a much better option to use the blinky example, as Kenneth mentioned earlier. 

    The Android blinky app does not show notifications, but we provide you the source code here so you can change the app to your requirements. 

    For information on how to implement notification in Android you can have a look at this article:
    https://developer.android.com/training/notify-user/build-notification

    Best regards
    Torbjørn

Children
Related