Friday, March 4, 2011

[android-developers] Hi all. This question is really annoying. Hope someone can come up with some advice. About C2DM

Hi there:

This problem has been confusing me for hours.
I try to use google push to get register to a certain server.
But first step is to get register_id, right?
XXXX@gmail.com is the email address that I use to apply for google register_id.

And the rest of the codes, are the same as in Android C2DM tutorial.
Besides, I already set up my Androidmanifest file.

The following is part of the code. I try to use these codes to get register_id first.

Intent registrationIntent = new Intent("com.googlt.android.c2dm.intent.REGISTER");

            registrationIntent.putExtra("app", PendingIntent.getBroadcast(this, 0, new Intent(), 0));

            registrationIntent.putExtra("sender", "XXXX@gmail.com");

            startService(registrationIntent);

            onReceive(context,registrationIntent);


But when I run my program, it stills says the program stopped unexpectedly.


So, does anyone have any suggestions?


Thanks a million.

      

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment