I’ve got my standalone Android app receiving notifications when my app is in the background, but it doesn’t seem to be receiving them when the app is closed. Is there something I need to do to enable this? Some permissions? I already added:
“android”: {
“permissions”: [“com.google.android.c2dm.permission.RECEIVE”]
}
I think maybe you need to actually perform an action on the notification to open your app, and then the notification will be delivered to your app. Have you tried that?
Expo apps don’t support background code execution (running code when the app is not foregrounded or the device is sleeping). This means you cannot use background geolocation, play audio in the background, handle push notifications in the background, and more. This is a work in progress. https://docs.expo.io/versions/latest/introduction/why-not-expo.html
I also look forward to a solution to this. Hopefully someone with more insight can weigh in.
I have the same problem. Notifications are not received on android when application is closed. Unfortunately, the most part of time the app is not opened so expo notifications are just useless…
This is a setting in Android; Battery Optimization, turn it off for your application (I think by default it is turned on, saying ‘Limit background activity of apps to lengthen battery life’. After turning it off your device WILL receive notifications, even when the application itself is closed.
@softhib I have a Lenovo A6020 that does not receive notifications when app is closed, but the rest of devices that I have tested on have no problems (Huawei P9 lite, Samsung S9, for naming a few).