Android Question Push message do not arrive if App is killed

ttsolution

Member
Licensed User
Longtime User
Hi All,

I spent 24h search and tried but could not solve my problem, so I need help from community. I follow Erel to implement Firebase messaging, every thing run very good. My problem is if user do not start the App so they do not receive the pusf notifycation. Or if user remove the App from recent App List they also do not receive the push notifycation. I received the following error
B4X:
** Service (firebasemessaging) Start **
(RuntimeException) java.lang.RuntimeException: Object should first be initialized.

I had tried the following but not works
#StartCommandReturnValue: android.app.Service.START_STICKY
#StartAtBoot: true

Many thanks for your help

Jonh,
 

KMatle

Expert
Licensed User
Longtime User
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
The user only needs to start your app once and it will start receiving messages.

Or if user remove the App from recent App List they also do not receive the push notifycation
This happens on some devices. The app is put in the "stop" state.
This is not the correct behavior, however there isn't anything that you can do about it.
 
Upvote 0

ttsolution

Member
Licensed User
Longtime User
Yes you are right as always Erel. I finally find out my error related SQL access not push message. The error raised because I executes SQL script before the SQL object Initialize. I take out lines of code that execute SQL and every thing works well.

Many thanks for you help KMatle, Erel

Jonh,
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…