Making push notifications work after device reboot when using Plugin.Firebase #465
Replies: 4 comments
-
Do you mean once ever? Or do you need to run the app once each time the device is restarted?
Why do you believe this? |
Beta Was this translation helpful? Give feedback.
-
|
I use push notifications to initiate syncing of notes data with the server. And I have widgets also on Android home screen. After reboot, I want the the above functionality to work without having to run the app. But this doesn't work with Plugin.Firebase.
Because it seems to be initialization issue due to which CrossFirebaseCloudMessaging.Current may be null inside the intent service (MESSAGING_EVENT). That's why it may not be able to trigger the events although the intent service may be receiving the calls. In order to make it work, I have explicitly write my own intent service (MESSAGING_EVENT) and do the work (syncing notes data) like I did before in Xamarin.Forms. |
Beta Was this translation helpful? Give feedback.
-
Are you getting specific error messages around this? Why do you think this is the problem? |
Beta Was this translation helpful? Give feedback.
-
About error messages, I am not able to check easily because after a reboot, the device is disconnected from the debugger. Once I launch the app after the reboot, the push notifications work. I saw the plugin code and it is using CrossFirebaseCloudMessaging.Current object to trigger the events from the intent service (MESSAGING_EVENT). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
First of all, thanks for making life easy with this plugin.
I don't know how to make Plugin.Firebase work after device boot. Meaning, the push notifications are not received until I explicitly run the app once. Can you please guide?
Currently trying on Android platform. But I believe similar issue may exist on iOS also.
Is this a limitation? Or is there any workaround?
Beta Was this translation helpful? Give feedback.
All reactions