How to get Registration ID from C2DM Servers?
I am very new to Android. I developed my project in android. Now I would like to add notification for my application. So I planned to use C2DM. I register to C2DM and i have received a mail. but i not yet receive registration ID from gmail. How can i receive from gmail registration. What 开发者_JAVA百科i wil do? Any body pls help me. Thanks in advance.
You have misunderstood the Registration ID. It will not be emailed to you. The Registration ID represents One App on One Device, so each user of your app will have a separate Registration ID. The get it, you need to request one, and it is sent to you as a C2DM message.
This tutorial explains how the process works, and how to get the registration ID http://www.vogella.de/articles/AndroidCloudToDeviceMessaging/article.html#example_manifest
Once you have the Registration ID, you need to store it on YOUR server, next to the user's record. Then, when your server sends a message to the user, it sends the Registration ID to the C2DM servers, along with a message. The Registration ID acts as a destination descriptor.
精彩评论