Skip to content

Instantly share code, notes, and snippets.

@renanreismartins
Created October 22, 2013 21:17
Show Gist options
  • Save renanreismartins/7108352 to your computer and use it in GitHub Desktop.
Save renanreismartins/7108352 to your computer and use it in GitHub Desktop.
public class GcmBroadcastReceiver extends WakefulBroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
ComponentName comp = new ComponentName(context.getPackageName(), GcmIntentService.class.getName());
startWakefulService(context, (intent.setComponent(comp)));
setResultCode(Activity.RESULT_OK);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment