0

I as wondering how the Android knows which app to send a push to. I'm guessing that when the app itself (client) registers for c2dm that the key returned is what identifies it as being for THIS app specifically. Is this right? I'm also guessing that the server side script actually sending the push doesn't need to know which application to send to. This would all be in the key that the client provided I'm assuming.

The reason I ask this is because we have one app so far on the MarketPlace, pushes work fine. But we are soon releasing our second app and I wanted to know if I could use the same credentials (email and password) and same script to send pushes to the new app without changing the script's code.

So if all the info on which app to send the pushes to resides in the client key (sent to our server from the device of course) then I would assume that no, I wouldn't have to change the script code or use new credentials.

On iPhone I'm pretty sure that one APN Push certificate is only good for one application, hopefully not so on Android.

Thanks.

PaulG
  • 6,920
  • 12
  • 54
  • 98

1 Answers1

1

We are currently using 1 google e-mail for several applications at once, so 1 e-mail is ok. The script doesn't need to change, if you really send the same message to many applications.

If you have 2 apps registered on a users phone and just send a message to all registration ids in a DB, then the message comes 2 or (n) times at once on the device. If it is a notification, then it is just annoying for the user.

You may want the applications send other information as package name, device id, etc to the server for specific logic. The quota can be an issue, as there can be 200000 messages sent per day in the free plan.

Demonick
  • 2,116
  • 3
  • 30
  • 40
  • Thanks a lot. In my case I don't think that our users will be running both apps at the same time. When the daily quota is passed are we contaced by Google? – PaulG Feb 27 '12 at 20:00
  • Technically the app doesn't need to run to receive messages, but it is important what your message receiver activity is doing. When the quota is passed, your sent messages will fail with QuotaExceeded error. – Demonick Feb 27 '12 at 20:09