Push notifications are delayed while in Android doze mode

302 views
Skip to first unread message

Michael Leung

unread,
Aug 11, 2016, 8:17:19 PM8/11/16
to Firebase Google Group
I am putting my Android device into idle/doze mode by entering the following commands:

adb shell dumpsys battery unplug

adb shell dumpsys deviceidle step <-- repeat until state is IDLE


Then I send the following JSON to FCM:

{
   
"to":"dufw ... Yd6",
   
"priority": "high",
   
"data":{
       
"test0":"test0",
       
"test1":"test1"

   
}
}

The result: Nothing... until I wake up the device, then I would get the message. I am logging whatever is coming in my subclass of FirebaseMessagingService's "onMessageReceived()" method.

I am using
Device: Samsung Galaxy S7
Android Studio: v2.1.2
FCM SDK: com.google.firebase:firebase-messaging:9.4.0

I already googled around. Some people suggest using a older IDE version and upgrading the FCM SDK version (I had it at 9.0.0 before). I haven't had any success so far. Any help would be greatly appreciated.
Reply all
Reply to author
Forward
0 new messages