title: how can I check the pending intent is received in an activity?
body: <p><strong>check this:</strong></p>
  
  <pre><code>private void delayhandler() {
    {
    long delayMillis = 6000;
    new Handler().postDelayed(new Runnable() {
         @Override
         public void run() {
           // TODO Auto-generated method stub
           // user is already login; goto dash board
           Intent intent = getIntent();
           if (intent != null &amp;&amp; intent.hasExtra("xxx")) {
              Intent mapActivityIntent = new Intent(getApplicationContext(), 
                                                    LatestOffersActivity.class);
              startActivity(mapActivityIntent);
            } else {
              Intent mapActivityIntent = new Intent(getApplicationContext(),
                                                    HomepageActivity.class);
              startActivity(mapActivityIntent);
            }
           SplashActivity.this.finish();
         }
      }, delayMillis);
    }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>private void sendNotification(com.fcm.Notification notification) {
      Uri defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
      NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this);
      notificationBuilder
              .setSmallIcon(R.mipmap.logo_actionbar)
              .setContentTitle(notification.getTitle())
              .setContentText(notification.getMessage())
              .setSound(defaultSoundUri)
              .setAutoCancel(true);
      int requestID = (int) System.currentTimeMillis();
      notificationBuilder.setContentIntent(getPendingIntent(this, requestID, SplashActivity.class));
      NotificationManager notificationManager =
              (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
      notificationManager.notify(requestID, notificationBuilder.build());
  }
  public static PendingIntent getPendingIntent(Context context, int requestID, Class classToLaunch) {
      Intent resultIntent = new Intent(context, classToLaunch);
      resultIntent.putExtra("xxx", "123");
  
      resultIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
      TaskStackBuilder stackBuilder = TaskStackBuilder.create(context);
      stackBuilder.addParentStack(classToLaunch);
      stackBuilder.addNextIntent(resultIntent);
      PendingIntent resultPendingIntent =
              stackBuilder.getPendingIntent(requestID, PendingIntent.FLAG_UPDATE_CURRENT);
  
      return resultPendingIntent;
  }
  </code></pre>