My environment
- Android device: Nexus 5, Samsung Galaxy Note, Nexus 5X
- Android OS version: 6.0+
- Google Play Services version: 9.2.1
- Firebase/Play Services SDK version: 9.2.1
Problem.
I tried executing the sample code. And to send downstream FCM, I have used GAE and have sent a message with following fields.
{
"to": "...".
"priority": "high",
"delay_while_idle":false,
"data": {...}
"time_to_live": 0
}
I am not able to receive the message, until I unlock the phone (bring it out of idle state). In this process, it is ignoring two parameters set when sending the message
- priority:high Which should deliver the message immediately irrespective of idle state,
- ttl:0 The message is delivered even if I unlock the phone after a few hours).
I combed through available documentations for FCM delivery, and they only explicitly mention behaviours for FCM with "notification" tag, FCM with "notification" and "data" tag. They don't clearly callout the behaviour when there is only "data" tag.
It feels like the message is getting delivered according to the params, but it is sent to the listener only on device wake up. Can this be the case? Because the POST response returns success and message_id instantenously.
PS: I believe this issue is fundamentally different from Issue #89 which was because the app was getting killed.
Steps to reproduce:
- Run the sample.
- Press home key and minimize the app (or leave it in foreground).
- Send device to idle with the following commands.
$ adb shell dumpsys battery unplug
$ adb shell dumpsys deviceidle step
- Send notification with above mentioned structure.
Results.
The message does not get delivered to the MyFirebaseMessagingService instance.
Leave the phone in idle for indefinite time and unlock the phone. The message gets delivered immediately.
Expected Results:
Message should get delivered immediately (priority: high) or it should be discarded on unsuccessful delivery (ttl:0)
My environment
Problem.
I tried executing the sample code. And to send downstream FCM, I have used GAE and have sent a message with following fields.
I am not able to receive the message, until I unlock the phone (bring it out of idle state). In this process, it is ignoring two parameters set when sending the message
I combed through available documentations for FCM delivery, and they only explicitly mention behaviours for FCM with "notification" tag, FCM with "notification" and "data" tag. They don't clearly callout the behaviour when there is only "data" tag.
It feels like the message is getting delivered according to the params, but it is sent to the listener only on device wake up. Can this be the case? Because the POST response returns success and message_id instantenously.
PS: I believe this issue is fundamentally different from Issue #89 which was because the app was getting killed.
Steps to reproduce:
Results.
The message does not get delivered to the
MyFirebaseMessagingServiceinstance.Leave the phone in idle for indefinite time and unlock the phone. The message gets delivered immediately.
Expected Results:
Message should get delivered immediately (priority: high) or it should be discarded on unsuccessful delivery (ttl:0)