1. Check out our companion app, Forums for Android! Download from Google Play

C2DM on Emulator

Discussion in 'Application Development' started by kistitan, Jul 22, 2010.

  1. kistitan

    kistitan New Member
    Thread Starter
    5

    Jul 22, 2010
    1
    0
    5
    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...