// Path: samples/push/app/src/main/java/com/apigee/push/Util.java
// static void displayMessage(Context context, String message) {
//   Intent intent = new Intent(DISPLAY_MESSAGE_ACTION);
//   intent.putExtra(EXTRA_MESSAGE, message);
//   context.sendBroadcast(intent);
// }


import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.NotificationCompat;
import android.util.Log;
import com.google.android.gcm.GCMBaseIntentService;
import static com.apigee.push.Settings.GCM_SENDER_ID;
import static com.apigee.push.Util.displayMessage;
package com.apigee.push;




public class GCMIntentService extends GCMBaseIntentService {

  public GCMIntentService() {
    super(GCM_SENDER_ID);
  }

  /**
   * Method called on device registered
   **/
  @Override
  protected void onRegistered(Context context, String registrationId) {
    Log.i(TAG, "Device registered: " + registrationId);
// Path: samples/push/app/src/main/java/com/apigee/push/Util.java
// static void displayMessage(Context context, String message) {
//   Intent intent = new Intent(DISPLAY_MESSAGE_ACTION);
//   intent.putExtra(EXTRA_MESSAGE, message);
//   context.sendBroadcast(intent);
// }


// Path: samples/push/app/src/main/java/com/apigee/push/GCMIntentService.java
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.NotificationCompat;
import android.util.Log;
import com.google.android.gcm.GCMBaseIntentService;
import static com.apigee.push.Settings.GCM_SENDER_ID;
import static com.apigee.push.Util.displayMessage;

package com.apigee.push;




public class GCMIntentService extends GCMBaseIntentService {

  public GCMIntentService() {
    super(GCM_SENDER_ID);
  }

  /**
   * Method called on device registered
   **/
  @Override
  protected void onRegistered(Context context, String registrationId) {
    Log.i(TAG, "Device registered: " + registrationId);
    displayMessage(context, getString(R.string.gcm_registered, registrationId));