0
点赞
收藏
分享

微信扫一扫

android 如何让通知不被清除或者点击后不消失?

四月天2021 2023-04-04 阅读 87


APP发送通知后,点击clear按钮,如何让通知不被清除?或者点击通知后,通知不消失?
[Solution]
APP发送通知时,通知需要添加flag:

notification.flags |= Notification.FLAG_ONGOING_EVENT;


或者
notification.flags |= Notification.FLAG_NO_CLEAR;


举报

相关推荐

0 条评论