I try to register to C2DM but it doesn’t work. I included com.google.android.c2dm in my project. When I try to find com.google.android.c2dm.intent.REGISTER , it doesn’t find anything :
String action = "com.google.android.c2dm.intent.REGISTER";
final PackageManager packageManager = context.getPackageManager();
final Intent intent = new Intent(action);
List<ResolveInfo> list = packageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
list.size() give 0. Any idea?
EDIT : mu manifest file contains the corrects permissions :
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
You need to make sure you have the
com.google.android.c2dm.permission.RECEIVEpermission in your manifest file.Also, I implemented registration using the following boilerplate
You can refer to the full docs for basic setup.