android - Latter Delivery Ack. from GCM to App server? -


i using gcm chat app. if user offline(not connected app internet active) send push notification devices receive perfectly. when device totally offline(neither connected app , nor active internet) @ time gcm send me response { id: xxxxxxxx,success: 3,failure: 2{message_id:xxxxx,ect:..}} on app server.

two device totally offline don't have active internet connection.. when device connect internet gcm send them message. how can app server know message delivered gcm.

i search lot can't satisfied answer. tried on messagerecive @ client device(android device) send httprequest app server not suitable app makes app slow.

so question how can know failure 2 message delivered.

first of all, not need update app server in case of downstream message after sent gcm server. explained here, gcm server stores message in case of offline device , delivers once device online.

(now assuming want handle network tasks on client) can use gcmnetworkmanager batch network discovery , connectivity related tasks across system through play services. go through documentation.

you can use gcm statistics , diagnostics google play developer console, too. gives details of messages handled particular app (through registration token) down status of specific messages (through message ids). more explanation here.

(however not clear want)

edit

but how can app server know message delivered gcm.

sorry, reading through again realised real question. answer pretty straight forward here.

.


Comments