Notification with “null” PendingIntent

后端 未结 2 1904
长情又很酷
长情又很酷 2021-02-04 01:44

I\'m trying to implement notification in Android.

Now I have a problem, I don\'t want to have a PendingIntent that user will open any Activity.

2条回答
  •  后悔当初
    2021-02-04 02:39

    PendingIntent contentIntent = PendingIntent.getActivity(
        getApplicationContext(),
        0,
        new Intent(), // add this
        PendingIntent.FLAG_UPDATE_CURRENT);
    

提交回复
热议问题