I am currently working on one android application which has C2DM implementation and I successfully implemented it. But Now I have problem in sending message to multiple devices.
As per my understanding following will be process for it:
- Save reg id & authcode in database (Suppose in c2dm table)
- Send message with a loop to all the data from c2dm.
But problem is:
every time I start application it ask for reg id & send it to server so if one device register 10 times the above loop will fail 9 times & works one time & this will make very large database which is not useful.
Does anyone know to what will be server side code (I am using PHP) when we want to send message to all device using my application & how I should save reg_id & authcode in database.
Thank You