Android firebase push notifications are not delivered after coming to online from offline when we use rest api php
Mobile Technologies
Mobile Computing
2 years ago
5
Star Rating
1
Rating
_x000D_
_x000D_
I have followed the below tutorial for firebase push notification in android using php rest api
https://www.simplifiedcoding.net/android-push-notification-tutorial-using-firebase/
I can able to receive push notification only when the registered device is online..
when its offline at time of sending push notification if the registered device is offline and if it comes online later, those notifications are not getting received..
When we send push notification even though device offline firebase response tells that its successfully delivered..
{"multicast_id":8938362209686545843,"success":3,"failure":0,"canonical_ids":0,"results":[{"message_id":"0:1493758633066681%9383da03f9fd7ecd"},{"message_id":"0:1493758633067106%9383da03f9fd7ecd"},{"message_id":"0:1493758633066683%9383da03f9fd7ecd"}]}[]
Do I need to do anything more for offline feature other than the above tutorial?
Tried adding FirebaseDatabase.getInstance().setPersistenceEnabled(true);
in the multidexapplication class, but still not working.
Thanks in advance
Posted on 16 Aug 2022, this text provides information on Mobile Computing related to Mobile Technologies. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Take Quiz To Earn Credits!
Turn Your Knowledge into Earnings.