Firebase cloud messaging not received when app in background

后端 未结 3 1105
南方客
南方客 2020-12-16 04:44

I recently updated my app to send messages through FCM and it works great when the app is run on Jelly Bean. The problem is it doesn\'t in case it\'s

相关标签:
3条回答
  • 2020-12-16 04:55

    It sounds like you're missing wake-lock permission in your Manifest file

    0 讨论(0)
  • 2020-12-16 04:57

    Ok, turns out Huawei has some power-saving features which cause that some apps won't be able to receive notifications, so it's not related to the Android version.

    I couldn't find a way to fix this programmatically, but if anyone's interested, go to Settings / Protected apps and select the apps you want to allow to be run on the background, so they receive notifications.

    More info here.

    0 讨论(0)
  • 2020-12-16 05:03

    Go to settings app choose your app then make sure you tick Show Notification and Untick Restrict to Launch

    0 讨论(0)
提交回复
热议问题