I am making a chatting app and I have 2 main activities. One is for contact and Second is for messages. When user select a contact I put that contact info inside intent and start next activity and get that info from intent like this.

```
        Intent i = getIntent();
        id = i.getIntExtra(EXTRA_ID, -1);
        reciever = i.getStringExtra(EXTRA_FRIEND); //reciever is friend form which i am recieving

```

This is working great. Now I have implemented notifications and when a notification arrives I put the id, and reciever in its intent but When I click on the notification new activity is not started rather old activity is restarted. I debugged this and confirmed that I am putting new values inside `callNotification` method but when activity starts the values are not new but the old one.

```
public void callNotification(int id_given,String reciever_given,String msg)
    {
        Intent actionIntent = new Intent(this, ChatActivity.class);

        actionIntent.putExtra(EXTRA_ID,id_given);              //value inserted here
        actionIntent.putExtra(EXTRA_FRIEND,reciever_given);   //value inserted here

        PendingIntent contentIntent = PendingIntent.getActivity(this,1,actionIntent,0);

        Notification notification = new NotificationCompat.Builder(this, MainActivity.CHANNEL_ID)
                .setSmallIcon(R.drawable.ic_baseline_chat)
                .setContentText("New Message")
                .setContentText(reciever+": "+msg)
                .setPriority(NotificationCompat.PRIORITY_HIGH)
                .setCategory(NotificationCompat.CATEGORY_MESSAGE)
                .setContentIntent(contentIntent)
                .setAutoCancel(true)
                .build();
        notificationManagerCompat.notify(1,notification);
    }

```

So I am wondering it there a special way of putting values inside pending intent of notification?