Android Question Firebase notification arrives only with app running

Mike1970

Well-Known Member
Licensed User

Attachments

  • FirebaseMessagingExample.zip
    9.8 KB · Views: 93
Last edited:

HAH

Well-Known 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)
 
Upvote 0

DonManfred

Expert
Licensed User
I added this to activity_create event
You NEVER should start the starter service manually

Quote from the Starter Service Tutorial
The starter service should never be explicitly started.
 
Upvote 0

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.
 
Upvote 0

Mike1970

Well-Known 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)
 
Upvote 0
Top