Remove notification after clicking

前端 未结 5 1036
刺人心
刺人心 2020-12-13 07:47

I want that the notification will be closed after the user is clicking on it. I saw that everybody saying to use flags, but I can\'t find the flags anywhere because I\'m usi

5条回答
  •  萌比男神i
    2020-12-13 08:44

    You can add a flag to your notification:

    http://developer.android.com/reference/android/app/Notification.html#FLAG_AUTO_CANCEL

    This will dismiss it upon clicking.

提交回复
热议问题