Reputation: 515
String postdata= "collapse_key=score_update&time_to_live=2419200&delay_while_idle=1&data.message="
+ message + "&data.time=" + System.DateTime.Now.ToString()
+ "®istration_id=" + deviceToken + "";
Confused with collapse_key and delay_while_idle flag. My notification is news. So now when the device is active, I am getting the notification in proper manner. But facing problem while it is idle(offline,locked or switched off). If two notifications has been send while the device was in idle state, it should receive both notifications whenever it comes to active. Should I append incremental value to collapse_key????? And in developer site it is given that delay_while_idle flag should be true. So i have set it to 1, but someone recommended me to set delay_while_idle=0. Please check the above screen and let me know if there is any correction.
Upvotes: 0
Views: 728
Reputation: 23873
If you want it to receive both notifications only when device becomes active again, leave delay_while_idle = true and increment/alter the collapse_key.
If you want the message(s) to appear even when the phone is locked/asleep, then set the delay_while_idle false.
Upvotes: 2