Firebase message with high priority not waking device from Doze android 6+

前端 未结 8 1333
一整个雨季
一整个雨季 2020-12-07 19:07

I have migrated my project from using GCM to use Firebase. Push notification comes through ok when the device is awake or been asleep recently but if I leave the device for

8条回答
  •  不知归路
    2020-12-07 19:27

    Instead of using "android":{"priority":"high"}, use like this

        {
          "time_to_live": 300000,
          "delay_while_idle": false,
          "data": {
                   "message": "PING_DEVICE",
                   "time": "21/01/2018 16:20:28",
                   "pushguid": "10062"
                   },
          "priority": "high"  
    }
    

提交回复
热议问题