Problem
In my webview app, I use onesignal to send user push notifications from my server. The device receives notifications not only when the app is running but also when it is completely closed. However, if I switch off and then switch on my phone, I do not get the notifications. And only after launching the app, I obtain those messages.
Idea
My idea was to launch my app on boot and immediately close it, so the user does not even notice it. However, I do not think it is a very good solution.
How do the developers usually solve this issue?
first of all you must wait at least 24 hr after reboot to make sure that the notifications are delivered or not (per documentation)

To make this waiting period shorter you should set the notification Priority to high priority 10
High Priority: These notifications are delivered immediately, though fall subject to the standby bucket policy on the device.
Set a high priority 10 if you need it to go through any doze mode / other power saving modes. But only use priority 10 when you really need to as there is a daily limit where it might fallback to normal priority.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With