Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not receiving notification when app is killed in android 8.0.0 and above (Oreo). #594

Closed
shahchaitanya opened this issue Aug 3, 2018 · 4 comments

Comments

@shahchaitanya
Copy link

shahchaitanya commented Aug 3, 2018

I'm using react-native onesignal 3.0.5 and react-native 0.53.3.

It's working absolutely fine in almost every platform (Android/IOS) and every situation (Running in Foreground/Background/Killed).

In android version 8.0.0 or above, app doesn't receiving notification or displaying notification while app is killed. I tested it on One Plus 5 and 5T. Other android devices except one plus, it's working fine.
Other apps like whats app, instagram notifications are working fine even app is killed.

I googled it out and i find out a hack I go to Settings> Battery> Battery Optimisation> (Three dots menu on left-top corner) Advanced optimisation > Turn off Advanced optimisation
Here. But this is not general solution.
These are also reference links but i can't get appropriate solution.
https://stackoverflow.com/questions/39504805/android-app-not-receiving-firebase-notification-when-app-is-stopped-from-multi-t/39505298#39505298

evollu/react-native-fcm#933

https://stackoverflow.com/questions/39480931/error-broadcast-intent-callback-result-cancelled-forintent-act-com-google-and

@Nightsd01
Copy link
Contributor

Nightsd01 commented Aug 6, 2018

@shahchaitanya Unfortunately, there just isn't much we can do about this. With some Chinese devices like the OnePlus, it's not possible to work around this, they will block notifications for apps that explicitly get terminated.

You may want to show a message to users that use these devices (OnePlus, Xiaomi, etc.) but if their OS flavor won't let us run the app, there isn't much we can do about it.

@shahchaitanya
Copy link
Author

@Nightsd01 Yeh I know It's not one signal problem. It's OS Problem. I searched solution but i didn't find workaround. So I posted it here.

@MayeuldP
Copy link

@shahchaitanya does your application at least display the pop up asking for the activation of notifications ? Coz, I have a user with a OnePlus 3T on 8.0.0 who doesn't even had the possibilities to say yes or not at the beggining with the pop up alert. Just wanted to know if it was the same problem.

@Nightsd01 How can you say the problem come from the OS when the others applications works well for the notification on his phone... ? 😮

@shahchaitanya
Copy link
Author

shahchaitanya commented Nov 5, 2018

@MayeuldP this will help you. Other application like Facebook and Whatsapp run in background even it's killed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants