It was really a frustrating start with Android C2DM at the very beginning.
Though the guide (http://code.google.com/android/c2dm/index.html) seems clear but there are something still have to figure out.

This is not a step-by-step tutorial post. Just for noting my practice.

1. Registered the RIGHT package.

At first, you have to finish the form and register this service of Google. And you should fill the RIGHT package name which is located in your AndroidManifest.xml.

2. Get the AUTH_TOKEN by ClientLogin.

The 3rd-party server should get the authentication and the token for using Google's services. Hence, you can use the following command to get your AUTH_TOKEN with your Google Account and your own server(s): 

 

curl https://www.google.com/accounts/ClientLogin -d Email=your@gmail.com -d "Passwd=password" -d accountType=GOOGLE -d source=Company-App-Version -d service=ac2dm

 

Please visit the link for more details of ClientLogin.

3. Make sure you keep the registration_id in your DATABASE.

That's it. You can start using C2DM from JumpNote first.

andreli 發表在 痞客邦 PIXNET 留言(0) 人氣()