Search code examples
phpandroidandroid-c2dm

How to Get Client Login Auth Token for C2DM In Android


I am presently developing push notifications in android. I get registration id from C2DM,but i how can i get client login auth token,how to write server side coding to send messages in php.

Please help me.


Solution

  • try curl:

    curl https://www.google.com/accounts/ClientLogin -d accountType=HOSTED_OR_GOOGLE -d Email=[Email] -d Passwd=[Password] -d service=ac2dm -d source=[CompanyName-Project-Version]

    Therefor you can use the PHP functions curl_init(), curl_setopt() and curl_exec()

    hope that helps...