Thursday 6 October 2011

C2DM

Known issues,

Google can do whatever it wants, impose limits, validate user device or server when it feels like it. There are not any classes you can use. Google goes as far suggesting you rip code from chrome to form.

You need to sign up, declare upfront how many messages you want to push. Sign up with a gmail account personal or app.

Server registers, device registers.

May or may not get any response to signup

Worth using dedicated email.

Send post to google device must be signed in with a google account.

Device receives intent from google which says you are all set up cool, receiving this code must be written not handled by any existing code.

User device must sign out and re register, device gets new id but seems to also reactivate previous so can get multiple push messages

Back on server http post to the regisration id

You get response success or error, success doesnt guarantee the delivery.

App overwrites c2dmbase onreceivemessage can be handed to notification. overwriting ondelete defines behaviour behaviour when user clears all.

No way of knowing if message is received. Alternative is polling or socket management.

Code on github.

No comments:

Post a Comment