I'm trying to follow this guide.
My GCM app receives messages via a class that extends WakefulBroadcastReciver. Upon receipt of a gcm message, I execute a GcmIntentService that processes the message via the following code . . .
public class GcmBroadcastReceiver extends WakefulBroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// Explicitly specify that GcmIntentService will handle the intent.
GlobalStuff.GCT = context.getApplicationContext();
ComponentName comp = new ComponentName(context.getPackageName(),
GcmIntentService.class.getName());
// Start the service, keeping the device awake while it is launching.
startWakefulService(context, (intent.setComponent(comp)));
setResultCode(Activity.RESULT_OK);
}
}
My AndroidManifest.xml defines the service as follows . . .
<receiver
android:name="com.deanblakely.myapp.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.deanblakely.myapp" />
</intent-filter>
</receiver>
The guide however only discusses migration of InstanceIDListenerService, GcmListenerService, and GcmPubSub. There is no discussion of what to do if I am using a GcmBroadcastReceiver. What should I do? Is there a better migration guide somewhere?