• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps C2DM on Emulator

kistitan

Lurker
Hi all,

I tired to try out the sample code mentioned in the Android Developers Blog: Android Developers Blog: Android Cloud To Device Messaging

As far as I understood it should work on emulator as well.

Here's my codepart :

Intent registrationIntent =
new Intent("com.google.android.c2dm.intent.REGISTER");
registrationIntent.putExtra(
"app", PendingIntent.getBroadcast(this, 0, new Intent(), 0));
registrationIntent.putExtra(
"sender", "xxxxxx@gmail.com");

startService(registrationIntent);

Am I right that after startservice () is called the onRecieve() of the activity should be called back with the registration ID? Or am I absolutely wrong? Just because for me nothing happens.

If I'm wrong, how can I get the registration ID on an emulator? Or is there any other things to do?
Did anybody else meet with the same issue?

Thanks very much for you help and hints

Kistitan
 
Back
Top Bottom