Please help me in this. I am getting authentication_failed error while registering for c2dm service. I have logged in developer account in my emulator.
Intent registrationIntent = new Intent("com.google.android.c2dm.intent.REGISTER");
registrationIntent.setPackage("com.google.android.gsf");
registrationIntent.putExtra("app", PendingIntent.getBroadcast(this, 0, new Intent(), 0));
registrationIntent.putExtra("sender", "developer@companydomain.com");
startService(registrationIntent);
In the BroadcastReceiver class, I am getting authentication_failed error. Please guide me where I am wrong..
Is developer@companydomain.com the e-mail address You used for sign-up of C2DM? In this case it makes no difference what e-mail address your emulator/device has, in fact it is dicouraged to use the same e-mail both for sign-up and registration.
Just put the e-mail address you used for sign-up in the sender extra.
If you still get the error, then the problem is in your server side google account authentication(which should too be the sign-up e-mail name and password).