title: Push Notification Android working alright previous, stops abruptly
body: <p>Integrated Push Notification in an app via gcm.jar in my app which was working alright till 8 hours back. I know as that was the time I received the last one.</p>
  
  <p>Here's is my GCM intent service:  </p>
  
  <pre><code>public class GCMIntentService extends GCMBaseIntentService {
  
      private static final String TAG = "GCMIntentService";
  
      public GCMIntentService() {
          super(CommonUtilities.SENDER_ID);
      }
  
      @Override
      protected void onRegistered(Context context, String registrationId) {
          Log.i(TAG, "Device registered: regId = " + registrationId);
          CommonUtilities.displayMessage(context, getString(R.string.gcm_registered));
          ServerUtilities.register(context, registrationId);
      }
  
      @Override
      protected void onUnregistered(Context context, String registrationId) {
          Log.i(TAG, "Device unregistered");
          CommonUtilities.displayMessage(context, getString(R.string.gcm_unregistered));
          if (GCMRegistrar.isRegisteredOnServer(context)) {
              ServerUtilities.unregister(context, registrationId);
          } else {
              // This callback results from the call to unregister made on
              // ServerUtilities when the registration to the server failed.
              Log.i(TAG, "Ignoring unregister callback");
          }
      }
  
      @Override
      protected void onMessage(Context context, Intent intent) {
          Log.i(TAG, "Received message");
  
          String message = intent.getStringExtra("message");
          String url = intent.getStringExtra("url");
          CommonUtilities.displayMessage(context, message);
          // notifies user
          generateNotification(context, message, url);
      }
  
      @Override
      protected void onDeletedMessages(Context context, int total) {
          Log.i(TAG, "Received deleted messages notification");
          String message = getString(R.string.gcm_deleted, total);
          CommonUtilities.displayMessage(context, message);
          // notifies user
          generateNotification(context, message,"");
      }
  
      @Override
      public void onError(Context context, String errorId) {
          Log.i(TAG, "Received error: " + errorId);
          CommonUtilities.displayMessage(context, getString(R.string.gcm_error, errorId));
      }
  
      @Override
      protected boolean onRecoverableError(Context context, String errorId) {
          // log message
          Log.i(TAG, "Received recoverable error: " + errorId);
          CommonUtilities.displayMessage(context, getString(R.string.gcm_recoverable_error,
                  errorId));
          return super.onRecoverableError(context, errorId);
      }
  
      /**
       * Issues a notification to inform the user that server has sent a message.
       */
  
      private static void generateNotification(Context context, String message, String url) {
          int icon = R.drawable.app_icon;
          long when = System.currentTimeMillis();
          Log.e(TAG, message);
          NotificationManager notificationManager = (NotificationManager)
                  context.getSystemService(Context.NOTIFICATION_SERVICE);
          Notification notification = new Notification(icon, message, when);
          String title = context.getString(R.string.app_name);
          Intent notificationIntent;
          if(!TextUtils.isEmpty(url)){
              notificationIntent= new Intent(Intent.ACTION_VIEW);
              notificationIntent.setData(Uri.parse(url));
          }else{
              notificationIntent= new Intent(context, SplashScreen.class);
              notificationIntent.putExtra("message", message);
          }
          // set intent so it does not start a new activity
          notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP |
                  Intent.FLAG_ACTIVITY_SINGLE_TOP);
          PendingIntent intent =
                  PendingIntent.getActivity(context, 0, notificationIntent, 0);
          notification.setLatestEventInfo(context, title, message, intent);
          notification.flags |= Notification.FLAG_AUTO_CANCEL;
          notificationManager.notify(0, notification);
      }
  
  }  
  </code></pre>
  
  <p>And with the appropriate permissions, in manifest:<br>
       </p>
  
  <pre><code>    &lt;receiver
          android:name="com.google.android.gcm.GCMBroadcastReceiver"
          android:permission="com.google.android.c2dm.permission.SEND" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="com.google.android.c2dm.intent.RECEIVE" /&gt;
              &lt;action android:name="com.google.android.c2dm.intent.REGISTRATION" /&gt;
  
              &lt;category android:name="com.packageappname" /&gt;
          &lt;/intent-filter&gt;
      &lt;/receiver&gt;
  </code></pre>
  
  <p>Had referred (implemented exactly that actually): <a href="http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/" rel="nofollow">http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/</a>  </p>
  
  <p>Right now I'm not receiving the notifications that are being pushed. I checked: <a href="http://developer.android.com/google/gcm/index.html" rel="nofollow">http://developer.android.com/google/gcm/index.html</a>  </p>
  
  <p>Do I have to mandatorily implement the new GCM to make it work or is there some problem with my intent service ?</p>