Android Multiple Notification sending same data on clicking

前端 未结 2 1071
太阳男子
太阳男子 2021-01-18 01:08

Notification in android taking same intent on clicking. I am sending notifications after installing the theme. Consider I install 4 themes and 4 notifications appear in Noti

2条回答
  •  Happy的楠姐
    2021-01-18 01:18

    Used this code which worked for me.

          int requestCode = new Random().nextInt();
          PendingIntent contentIntent = PendingIntent.getActivity(this, requestCode, 
          notificationIntent, PendingIntent.FLAG_CANCEL_CURRENT);
    

提交回复
热议问题