Notifications stop displaying on Android 8 and 8.1
See original GitHub issue- React-Native version 0.51, react-native-fcm version (14.1.2 sdk-26 branch)
- Nokia 8 (Android 8.1) and Nokia 7 Plus (Android One 8.0.0)
- App is not running or running in background (user bug report, user was not sure)
- Firebase version 11.8.0
Hi,
I have an an released with react-native-fcm, and I’m getting user reports that notifications work for a while, then just stop. I finally managed to get a log report of one of the incidents, and the message that comes up is this:
05-07 17:18:01.849 27551 27551 W GCM : broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE flg=0x10000000 pkg=to.synced.synced (has extras) }
Once the message comes up, it continues coming, and no further notifications arrive
Googling around it seems this crops up most often when the app is force killed by a battery saving mechanism more common in phones like the OnePlus 3T.
But in this case there is no battery saving being applied, at some point this message pops up and the notifications stop (along with the foreground service the app runs while it is closed).
I’ve also tried the same code on Android 5.1 and it runs without issue
I’m using custom notifications for Android, with the following format
{
"custom_notification": {
"channel":"default",
"id":id,
"number": number,
"body": body,
"big_text": body,
"title": title,
"icon":"ic_notif",
"priority":"high",
"sound":"default",
"show_in_foreground": showinfg
}
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:20 (7 by maintainers)
Top GitHub Comments
Digging through the logs I did come across this. Is
number
supposed to be a float?Many thanks @evollu!