C2DM on Emulator


Last Updated:

  1. kistitan

    kistitan New Member This Topic's Starter

    Joined:
    Jul 22, 2010
    Messages:
    1
    Likes Received:
    0
    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
     

    Advertisement

Share This Page

Loading...