Android Open Source - Android-App Gcm Broadcast Receiver

From Project

Back to project page Android-App.


The source code is released under:

MIT License

If you think the Android project Android-App listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.cmbhack.crowdtrain;
//from  w  w  w .ja  v a2  s .c  om
import java.util.Date;

import android.content.ComponentName;
import android.content.Context;
import android.content.Intent; 
import android.util.Log;

public class GcmBroadcastReceiver extends {
    public void onReceive(Context context, Intent intent) {
    Log.d("GCM","GCM recieved"); 
        ComponentName comp = new ComponentName(context.getPackageName(),
        startWakefulService(context, (intent.setComponent(comp)));

Java Source Code List