B4A Library FirebaseNotifications - Push messages / Firebase Cloud Messaging (FCM)

Status
Not open for further replies.

tigrot

Well-Known Member
Licensed User
Longtime User
For other OS I use a second App which starts when the first terminates, wait for a little time and then restarts the first App again. I don't know if if an App can restart itself after termination, also "booking" this action before termination. Is this possibile in OS Android?
 

Seneca

Active Member
Licensed User
On some devices, applications cannot be started from a push notification after they were explicitly killed by the user.

I mean not to start the app from a push notification. But after killing the app and restart it no longer receives any notification that had been sent while the app was killed.
 

DonManfred

Expert
Licensed User
Longtime User
I don't know if if an App can restart itself after termination, also "booking" this action before termination. Is this possibile in OS Android?
There is no Api to restart your App.
For other OS I use a second App which starts when the first terminates, wait for a little time and then restarts the first App again.
In Android (at least in newer Versions) you are not able to see the other app is actually terminated. So, you can´t react on this.
 

Seneca

Active Member
Licensed User
When you restart the app do you also restart the firebase service?

After restarting, the Firebase service starts successfully. In fact, the messages I send after restarting the app are received correctly. Messages that aren't received are those that were sent while the app was killed.

Attached screenshot with services, before and after. They are the same.


 

Erel

B4X founder
Staff member
Licensed User
Longtime User
This fits the situation I described. On some devices when you kill an app with a swipe, the app goes to the stop state and ignores all notifications until the app is explicitly started again. This is not the common behavior.

You shouldn't however expect all messages to be received. Instead contact your server when a message arrives and download whichever information you need (or do it when the app starts).
 

Seneca

Active Member
Licensed User
And is it normal that after restarting the app explicitly does not receive the messages that were sent while it was killed, but does it receive the messages that are sent from that moment?
 

uniplan

Active Member
Licensed User
Longtime User
Hi, i followed this example to sent a notification push.
I'm not included the last part where you can send the message to topic.
I'm interested only on the part where you can sent the message from firebase to all devices.

I test it and i receive the notification push, but the title and body are null.
you can help me about this problem?
Thank you @Erel
 

tznikos

Member
Licensed User
Longtime User
Hi,

I face the same problem with uniplan,

When the application is in the foreground, i receive the notification push, but the title and body are null.
If the application is in the Background or is closed then receive the message correct,

can anyone know why happen that ?
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…