Hi all,
I'm suffering a mental blackout about FCM notifications.
First of all, everything works. The reason for this post is that I'd like to show the simple notification only when the app is not in foreground.
So, when fm_MessageArrived is fired, I firstly operated on the data making up the message (i.e. update the local DB or execute a "command") then I'd like to choose whether to show a notification or not (eventually showing a toast or similar message window).
It should exist something telling me whether my B4xPages app is in its foreground state or it was awaken by the OS to process the FCM message. Simply I can recall it at this moment.
BTW, is NB6 adviced over simple notifications for basic messages (e.g. "it's your turn", "your order is ready",...)?
Thank you all.
I'm suffering a mental blackout about FCM notifications.
First of all, everything works. The reason for this post is that I'd like to show the simple notification only when the app is not in foreground.
So, when fm_MessageArrived is fired, I firstly operated on the data making up the message (i.e. update the local DB or execute a "command") then I'd like to choose whether to show a notification or not (eventually showing a toast or similar message window).
It should exist something telling me whether my B4xPages app is in its foreground state or it was awaken by the OS to process the FCM message. Simply I can recall it at this moment.
BTW, is NB6 adviced over simple notifications for basic messages (e.g. "it's your turn", "your order is ready",...)?
Thank you all.