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:
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
My solution has just been to mark records as deleted in my database if Google gives me a response indicating that it's an invalid registration or no longer registered. Then it only fails once for a given registration.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With