List of usage examples for android.content ComponentName ComponentName
private ComponentName(String pkg, Parcel in)
From source file:addresspager.test_google_cloud_messaging.GcmBroadcastReceiver.java
@Override public void onReceive(Context context, Intent intent) { // Explicitly specify that GcmIntentService will handle the intent. 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);//from w w w. java 2s . co m }
From source file:com.csform.android.uiapptemplate.gcm.GcmBroadcastReceiver.java
@Override public void onReceive(Context context, Intent intent) { // Explicitly specify that GcmIntentService will handle the intent. ComponentName comp = new ComponentName(context.getPackageName(), com.csform.android.uiapptemplate.gcm.GcmIntentService.class.getName()); // Start the service, keeping the device awake while it is launching. startWakefulService(context, (intent.setComponent(comp))); setResultCode(Activity.RESULT_OK);// w w w . jav a2 s .com }
From source file:com.dbztech.universalpresenterremote.upr.GcmBroadcastReceiver.java
@Override public void onReceive(Context context, Intent intent) { // Explicitly specify that GcmIntentService will handle the intent. ComponentName comp = new ComponentName(context.getPackageName(), com.dbztech.universalpresenterremote.upr.GcmIntentService.class.getName()); // Start the service, keeping the device awake while it is launching. startWakefulService(context, (intent.setComponent(comp))); setResultCode(Activity.RESULT_OK);//from w ww . jav a 2s. c om }
From source file:com.example.demoflavius.GcmBroadcastReceiver.java
@Override public void onReceive(Context context, Intent intent) { try {/* ww w . j a v a2s . co m*/ // Explicitly specify that GcmIntentService will handle the intent. 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); } catch (Exception ex) { ex.printStackTrace(); } }
From source file:com.eoldsolutions.quinielavirtualandroid.presentation.notification.NotificationBroadcastReceiver.java
@Override public void onReceive(Context context, Intent intent) { // Explicitly specify that GcmIntentService will handle the intent. ComponentName comp = new ComponentName(context.getPackageName(), NotificationIntentService.class.getName()); // Start the service, keeping the device awake while it is launching. startWakefulService(context, (intent.setComponent(comp))); setResultCode(Activity.RESULT_OK);/*from ww w. j a v a2 s . co m*/ }
From source file:com.example.cloudmessaging.GcmBroadcastReceiver.java
@Override public void onReceive(Context context, Intent intent) { // Explicitly specify that GcmIntentService will handle the intent. 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);// w ww. jav a 2 s. c o m System.out.print("RECIEVED MESSAGE!"); }
From source file:com.ayaseya.nolnotification.GcmBroadcastReceiver.java
@Override public void onReceive(Context context, Intent intent) { // Log.v(TAG, "onReceive()"); // Explicitly specify that GcmIntentService will handle the intent. 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);/*from w w w . j a va 2 s . c o m*/ }
From source file:com.example.hack_push.GcmBroadcastReceiver.java
@Override public void onReceive(Context context, Intent intent) { Bundle extras = intent.getExtras();/* w ww .j av a2s . co m*/ String message = extras.getString("message"); 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); Intent intent_sendback = new Intent(MainActivity.DISPLAY_MESSAGE_ACTION); intent_sendback.putExtra("message", message); context.sendBroadcast(intent_sendback); }
From source file:com.dartmouth.yuanjiang.myruns_2.GcmBroadcastReceiver.java
@Override public void onReceive(Context context, Intent intent) { Log.d("d", "delete"); // Explicitly specify that GcmIntentService will handle the intent. 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);// w w w. ja v a2s . c o m }
From source file:com.amzur.pilot.notifications.GcmBroadcastReceiver.java
@Override public void onReceive(Context context, Intent intent) { Log.i("Listing", "received"); // Explicitly specify that GcmIntentService will handle the intent. ComponentName comp = new ComponentName(context.getPackageName(), MyGcmListenerService.class.getName()); // Start the service, keeping the device awake while it is launching. startWakefulService(context, (intent.setComponent(comp))); setResultCode(Activity.RESULT_OK);// ww w . ja v a 2s .c o m }