title: custom notification
body: <p>Implemented Custom notification using this <a href="http://developer.android.com/training/notify-user/build-notification.html" rel="nofollow noreferrer">tutorial</a></p>
  
  <p><strong>Problem</strong> is getting 2 notifications now.
   one is <strong>default Notification</strong> and other is <strong>custom Notification</strong>.</p>
  
  <p>How to disable <strong>default Notification.</strong></p>
  
  <p>code :</p>
  
  <pre><code> public void showNotificationMessages(String title, String message, Intent intent) {
          int icon = R.mipmap.ic_launcher;
          PendingIntent resultPendingIntent =
                  PendingIntent.getActivity(
                          mContext,
                          0,
                          intent,
                          PendingIntent.FLAG_UPDATE_CURRENT
                  );
          NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(mContext)
                  .setSmallIcon(icon)
                  .setContentTitle("Project")
                  .setContentText(""+title+" custom notification")
                  .setContentIntent(resultPendingIntent)
                   .setAutoCancel(true);
          int mNotificationId = 001;
          NotificationManager mNotifyMgr =
                  (NotificationManager) mContext. getSystemService(Context.NOTIFICATION_SERVICE);
          mNotifyMgr.notify(mNotificationId, mBuilder.build());
  }
  </code></pre>
  
  <p>Manifest</p>
  
  <pre><code>  &lt;receiver  android:name=".receiver.CustomPushReceiver"
        android:exported="false"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="com.parse.push.intent.RECEIVE" /&gt;
              &lt;action android:name="com.parse.push.intent.DELETE" /&gt;
              &lt;action android:name="com.parse.push.intent.OPEN" /&gt;
              &lt;action android:name="android.intent.action.BOOT_COMPLETED" /&gt;
              &lt;action android:name="android.intent.action.USER_PRESENT" /&gt;
          &lt;/intent-filter&gt;
      &lt;/receiver&gt;
  </code></pre>
  
  <p>Screenshot</p>
  
  <p><a href="https://i.stack.imgur.com/0AN4T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0AN4T.png" alt="Screenshot"></a></p>
  
  <p>CustomReceiver </p>
  
  <pre><code>@Override
  protected void onPushReceive(Context context, Intent intent) {
      super.onPushReceive(context, intent);
  
      if (intent == null)
          return;
  
      try {
          JSONObject json = new JSONObject(intent.getExtras().getString("com.parse.Data"));
  
          Log.e(TAG, "Push received: " + json);
  
          parseIntent = intent;
  
          parsePushJson(context, json);
  
      } catch (JSONException e) {
          Log.e(TAG, "Push message json exception: " + e.getMessage());
      }
  }
   private void parsePushJson(Context context, JSONObject json) {
      try {
  
          String title = json.getString("alert");
  
          Intent resultIntent = new Intent(context, MainActivity.class);
          showNotificationMessage(context, title, "", resultIntent);
  
  
      } catch (JSONException e) {
          Log.e(TAG, "Push message json exception: " + e.getMessage());
      }
  }
      private void showNotificationMessage(Context context, String title, String message, Intent intent) {
  
      notificationUtils = new NotificationUtils(context);
      intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
      notificationUtils.showNotificationMessages(title, message, intent);
  }
  </code></pre>