D Darknight20 Member Apr 2, 2020 #1 Hi I create a simple messanger app and use firebase notification for receive new message. I use firebase like this: https://www.b4x.com/android/forum/t...-messages-firebase-cloud-messaging-fcm.67716/ It usually works well but some time firebase not receive any message for few minutes and firebasemessage service not start when new meesage sended, it look like firebase disconnected from server but it is impossible and i think this problem from my app. So, how i can prevent from happening this problem and firebase always work and receive???or how i can check and keep firebase connection?? Thanks.
Hi I create a simple messanger app and use firebase notification for receive new message. I use firebase like this: https://www.b4x.com/android/forum/t...-messages-firebase-cloud-messaging-fcm.67716/ It usually works well but some time firebase not receive any message for few minutes and firebasemessage service not start when new meesage sended, it look like firebase disconnected from server but it is impossible and i think this problem from my app. So, how i can prevent from happening this problem and firebase always work and receive???or how i can check and keep firebase connection?? Thanks.
Erel B4X founder Staff member Licensed User Longtime User Apr 3, 2020 #2 If you are able to receive messages while the app is not running then Firebase is configured properly. Restart the phone, don't run anything and send a message. Was it received? Upvote 0
If you are able to receive messages while the app is not running then Firebase is configured properly. Restart the phone, don't run anything and send a message. Was it received?
D Darknight20 Member Apr 3, 2020 #3 Erel said: If you are able to receive messages while the app is not running then Firebase is configured properly. Restart the phone, don't run anything and send a message. Was it received? Click to expand... When restart phone or reconnect internet it is work again but i won't do this because my app published and have users and this problem happen some time , also if you wait a few minutes and not do anything it solve automatically! Upvote 0
Erel said: If you are able to receive messages while the app is not running then Firebase is configured properly. Restart the phone, don't run anything and send a message. Was it received? Click to expand... When restart phone or reconnect internet it is work again but i won't do this because my app published and have users and this problem happen some time , also if you wait a few minutes and not do anything it solve automatically!
Erel B4X founder Staff member Licensed User Longtime User Apr 3, 2020 #4 It sounds like your app is configured properly. Don't assume that all notifications will arrive immediately. Once your app starts you should connect to YOUR server and download all messages. Upvote 0
It sounds like your app is configured properly. Don't assume that all notifications will arrive immediately. Once your app starts you should connect to YOUR server and download all messages.
D Darknight20 Member Apr 3, 2020 #5 Erel said: It sounds like your app is configured properly. Don't assume that all notifications will arrive immediately. Once your app starts you should connect to YOUR server and download all messages. Click to expand... Ok , thanks , maybe i can do this. Also :exist a code or function for check firebase new notification and message when app started?? Upvote 0
Erel said: It sounds like your app is configured properly. Don't assume that all notifications will arrive immediately. Once your app starts you should connect to YOUR server and download all messages. Click to expand... Ok , thanks , maybe i can do this. Also :exist a code or function for check firebase new notification and message when app started??
Erel B4X founder Staff member Licensed User Longtime User Apr 3, 2020 #6 There is no such thing. Don't use push notifications as a replacement for your server. They should only be used as a trigger. Upvote 0
There is no such thing. Don't use push notifications as a replacement for your server. They should only be used as a trigger.