Android Question Not receive push when app is closed

uniplan

Active Member
Licensed User
Longtime User
Hi, i have implemented the notification push with firebase, and i save and display my notify message in method "fm_MessageArrived" like this

B4X:
...    n.SetInfo2(titolo,messaggio_problema,id_notifica,Main)

    n.Vibrate=True
    n.AutoCancel=True
    n.Notify(id_notifica)

i set the actovity main to start when the notify is clicked.
But i have a problem when i start phone and app is closed...i don't receive the notifications.
Only when i start the application, i receive the notify.
Ho i can solve it and receive the notify always?

Thank you
 

DonManfred

Expert
Licensed User
Longtime User
Last edited:
Upvote 0

uniplan

Active Member
Licensed User
Longtime User
android:minSdkVersion="7" android:targetSdkVersion="22"

thi is my configuration...
and the firebase service is set with #StartAtBoot: false
i send push with window service , i create a json and send post message.
what i can do for my b4a App?
 
Upvote 0

uniplan

Active Member
Licensed User
Longtime User
Yes because i receive correctly the push when app is opened or work in background.If is closed i don't receive it.
 
Upvote 0

uniplan

Active Member
Licensed User
Longtime User
ok... thank you so much..
I Find my problem..
i insert my notify before the initialization of sql, and i have an exception.
i initialize the sql inside main activity.
 
Upvote 0
Top