android - Sometime Not Receiving push notification GCM in Mobile -



android - Sometime Not Receiving push notification GCM in Mobile -

i facing unusual problem. getting force notification in mobile, if connected net @ point when message has been send server side. if not connected net @ time , rather connecting net after time. not receiving notification. according knowledge notifications should show whenever online, because gcm server stores messages. receiving notification other apps. have given wakelock permission in manifest. might problem? server side, client side or mobile? please help...

this value send gcm server 3rd party server(.net server):

string postdata= "collapse_key=score_update&time_to_live=2419200&delay_while_idle=1&data.message=‌​" + message + "&data.time=" + system.datetime.now.tostring() + "&registration_id=" + devicetoken + ""

thanks in advance

delay_while_idle=1 contradicts also have given wakelock permission in manifest

delay_while_idle=1 means message won't reach device if it's idle (off, offline, locked screen, etc...). alter 0 if want wakelock permission create difference.

just clarify - message should reach device after stops beingness idle (as long hadn't been idle long, "too long" determined specified time_to_live).

here's relevant quote gcm documentation :

delay_while_idle

if included, indicates message should not sent if device idle. server wait device become active, , lastly message each collapse_key value sent. optional. default value false, , must json boolean.

time_to_live

how long (in seconds) message should kept on gcm storage if device offline. optional (default time-to-live 4 weeks, , must set json number).

android push-notification google-cloud-messaging

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -