Android Question Firebase notification arrives only with app running

Mike1970

Well-Known Member
Licensed User
Longtime User

Attachments

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

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime 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

Erel

B4X founder
Staff member
Licensed User
Longtime 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
Longtime User
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
Cookies are required to use this site. You must accept them to continue using the site. Learn more…