简体   繁体   中英

same GCM Registration id for two applications in android?

sorry for my bad English. i am developing an Android application which include chat functionality. i am planning to upload two versions on Google play. one is lite version and one is pro. i am using GCM to include chat functionality. i want to ask is it better to upload two versions of app to market instead of one application with in-app purchase. and if i upload two apps then how to differentiate those applications to use different GCM Id's. i know it not a programming question but i need help on it. any suggestion.

I'm not sure how to answer the first part of your question (two apps vs. one app).

As for the second part, if you upload two applications, you can either use the same sender ID to register to GCM for the two apps, or use a different sender ID to register each app to GCM. Either way, if you install both apps on the same device, each would get a different Registration ID from GCM.

When sending a GCM message from your server to the apps, you would have to either use the same API key (if you used the same sender ID in the registration to GCM) or different API keys (if you used different sender IDs).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM