Android Question Firebase notification arrives only with app running

Mike1970

Active Member
Licensed User

Attachments

Last edited:

HAH

Active Member
Licensed User
In my app, it is still receiving msgs even I killed the app, I added this to activity_create event:
B4X:
    StartService(FirebaseMessaging)
    StartService(Starter)
 

DonManfred

Expert
Licensed User
I dont know. i just know that Erel wrote the above sentence in the tutorial. It must have a reason!
 

Erel

Administrator
Staff member
Licensed User
The starter service is a special service. It will misbehave if started explicitly.

If the notifications only arrive when your app is running then you haven't implemented it properly.
Carefully follow the tutorial and make sure to use the B4J code to send the messages.

With that said, it is better not to kill the app while testing it. You can instead restart the device as a test.
 

Mike1970

Active Member
Licensed User
The starter service is a special service. It will misbehave if started explicitly.

If the notifications only arrive when your app is running then you haven't implemented it properly.
Carefully follow the tutorial and make sure to use the B4J code to send the messages.

With that said, it is better not to kill the app while testing it. You can instead restart the device as a test.
I carefully followed the tutorial, infact the same code works on 2 devices out of 3.
The third was the first i was working with

(I tried to restart)
 

Erel

Administrator
Staff member
Licensed User
On some devices notifications will not work after the user explicitly kills the app. There is nothing that you can do about it.

If notifications works properly on most devices then it is likely that there is no problem in your app.
 
Top