9

I am putting my Android device to sleep via adb:

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

Then I am sending the following JSON:

{
   "to":"dYA7tVZrfag:APA91bFVqddVcJHnr_7ZhgNC5iu4Y6XKcLbSVD4DlZgfjMKwKvZhJHiKR4DIzpMrX8zUL15C_adfyEcrlI9q6zOFqFs_zwNPTVIDm-v20ZK0qgagKYGaQE1OPBqdH4P_JHYIXOIS3gfn",
    "priority": "high",
    "data":{
        "test0":"test0",
        "test1":"test1"
    }
}

Result: Nothing... until I wake up the device, then I get all the messages queued. I am monitoring if messages are coming by putting logs in the method onMessageReceived().

I googled around and some people say using an older version of Android Studio or upgrading the version (9.4.0) of the FCM SDK would fix the problem. I've done both with no success.

Edit: This problem seem to only happen with the Samsung Galaxy S5

kyrax
  • 1,192
  • 3
  • 13
  • 29
  • High priority messages are supposed to be delivered to devices even if they are in doze mode. If this is happening on the Samsung Galaxy S5 and can be reproduced, then it is a bug and you should file it at firebase.google.com/support – Arthur Thompson Aug 12 '16 at 23:01
  • 3
    @ArthurThompson Thanks for the reply. It's 100% reproducible and it seems like other people are having the same issue with other phones, which makes me think the bug does not exists on specific devices, but on the FCM service. I filed this bug to firebase and hopefully it will be resolved soon. – kyrax Aug 14 '16 at 19:17
  • is this problem occurs on WIFI connection and Cellular connection as well? (I'm having problems only on wifi router connection + doze mode, on some android 6.0.1 devices like galaxy note 5) – NBApps Aug 21 '16 at 08:06
  • I have the same problem exactly on galaxy note 5, all other devices i have running android 6.0.1 and lower works fine. all android libraries updated, using FCM. (is it a samsung bug as it appears?)http://stackoverflow.com/questions/39192889/galaxy-note-5-push-notification-via-fcm-priority-high-not-waking-up-from-doze – NBApps Aug 31 '16 at 00:06
  • @Gdroid Yes it's happening on both WiFi and cellular data. I tested it with the GCM sample app and it doesn't work there either. When you say 6.0.1 and under, are you including 6.0? Doze mode was introduced in Android 6.0 – kyrax Aug 31 '16 at 20:05
  • haven't tested it on android 6.0. I meant to say that out of all my devices (2 running 6.0.1, one 5.0.1 and one 4.4.2) and customers devices, only note 5 running 6.0.1 have this problem – NBApps Sep 01 '16 at 09:14

0 Answers0