RFID Transports/app/src/main/java/es/uca/tfg_ismaelsantos/GCM/GcmBroadcastReceiver.java
// Receives the broadcast directly from GCM service
Receives the broadcast directly from GCM service
Receives the broadcast directly from GCM service
@Override
    public void onReceive(Context context, Intent intent) {
        ComponentName comp = new ComponentName(context.getPackageName(),
                GcmMessageHandler.class.getName());
        Log.d(TAG,"Get packageName: "+context.getPackageName());
        Log.d(TAG,"Get name: "+GcmMessageHandler.class.getName());
        startWakefulService(context, (intent.setComponent(comp)));
        setResultCode(Activity.RESULT_OK);
    }
@ Override public void onReceive ( Context context , Intent intent ) { ComponentName comp = new ComponentName ( context . getPackageName ( ) , GcmMessageHandler . class . getName ( ) ) ; Log . d ( TAG , "Get packageName: " + context . getPackageName ( ) ) ; Log . d ( TAG , "Get name: " + GcmMessageHandler . class . getName ( ) ) ; startWakefulService ( context , ( intent . setComponent ( comp ) ) ) ; setResultCode ( Activity . RESULT_OK ) ; }
Receives the broadcast directly from GCM service
Receives the broadcast directly from GCM service
// Explicitly specify that GcmMessageHandler will handle the intent. // Start the service, keeping the device awake while it is executing. // Return successful