// Path: samples/push/app/src/main/java/com/apigee/push/Util.java
// static final String DISPLAY_MESSAGE_ACTION = "com.ganyo.pushtest.DISPLAY_MESSAGE";
// 
// Path: samples/push/app/src/main/java/com/apigee/push/Util.java
// static final String EXTRA_MESSAGE = "message";
// 
// Path: samples/push/app/src/main/java/com/apigee/push/Util.java
// static final String TAG = "com.ganyo.pushtest";


import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Configuration;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.gcm.GCMRegistrar;
import static com.apigee.push.Util.DISPLAY_MESSAGE_ACTION;
import static com.apigee.push.Util.EXTRA_MESSAGE;
import static com.apigee.push.Util.TAG;
  }

  private void initUI() {
    setContentView(R.layout.main);
    messageTextView = (TextView)findViewById(R.id.lblMessage);

    sendButton = (Button)findViewById(R.id.sendButton);
    sendButton.setOnClickListener(new View.OnClickListener() {
      public void onClick(View v) {
        AppServices.sendMyselfANotification(v.getContext());
      }
    });

    registerReceiver(notificationReceiver, new IntentFilter(DISPLAY_MESSAGE_ACTION));
  }

  /**
   * Receives push Notifications
   * */
  private final BroadcastReceiver notificationReceiver = new BroadcastReceiver() {

    @Override
    public void onReceive(Context context, Intent intent) {

      // Waking up mobile if it is sleeping
      WakeLocker.acquire(getApplicationContext());

      /**
       * Take some action upon receiving a push notification here!
       **/
// Path: samples/push/app/src/main/java/com/apigee/push/Util.java
// static final String DISPLAY_MESSAGE_ACTION = "com.ganyo.pushtest.DISPLAY_MESSAGE";
// 
// Path: samples/push/app/src/main/java/com/apigee/push/Util.java
// static final String EXTRA_MESSAGE = "message";
// 
// Path: samples/push/app/src/main/java/com/apigee/push/Util.java
// static final String TAG = "com.ganyo.pushtest";


// Path: samples/push/app/src/main/java/com/apigee/push/PushMainActivity.java
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Configuration;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.google.android.gcm.GCMRegistrar;
import static com.apigee.push.Util.DISPLAY_MESSAGE_ACTION;
import static com.apigee.push.Util.EXTRA_MESSAGE;
import static com.apigee.push.Util.TAG;

  }

  private void initUI() {
    setContentView(R.layout.main);
    messageTextView = (TextView)findViewById(R.id.lblMessage);

    sendButton = (Button)findViewById(R.id.sendButton);
    sendButton.setOnClickListener(new View.OnClickListener() {
      public void onClick(View v) {
        AppServices.sendMyselfANotification(v.getContext());
      }
    });

    registerReceiver(notificationReceiver, new IntentFilter(DISPLAY_MESSAGE_ACTION));
  }

  /**
   * Receives push Notifications
   * */
  private final BroadcastReceiver notificationReceiver = new BroadcastReceiver() {

    @Override
    public void onReceive(Context context, Intent intent) {

      // Waking up mobile if it is sleeping
      WakeLocker.acquire(getApplicationContext());

      /**
       * Take some action upon receiving a push notification here!
       **/
      String message = intent.getExtras().getString(EXTRA_MESSAGE);