Search code examples
androidpush-notificationserver-pushandroid-c2dm

Android C2DM ROLE account and package name


In the C2DM sign up form, (out of many things) we are asked with the following two:

  1. A package name for the application receiving the messages
  2. A ROLE account email ID which will be used to send messages to the C2DM server.

My question is : Are these two things tied together ?

Can the same registered application (package name) accept messages from any (or many) registered ROLE account email ID ?

A use case :

I have to sell my solution to multiple organizations. The solution includes the device application as well as a server part (that sends messages).

I have a registered package name say com.foo.Test (and provided a dummy ROLE account since that is a required field in the sign up form)

Now, each organization (I have sold my solution to) should be able to push notification messages using their own ROLE account ID to com.foo.Test Should (and can) they sign up again with the same package name and their own ROLE account ID ?


Solution

  • Well, I found out that these two are not tied together. Initially I had a package name say (com.foo.test) registered on the C2DM sign up form. At that time I provided a ROLE account ID (say [email protected]). Later on I went to the sign up page again and entered the same package name (com.foo.test) along with a different ROLE account ID (say [email protected]) On two successive scenarios, the device app used these 2 ROLE account IDs as Sender IDs and was able to receive push notifications successfully.