简体   繁体   中英

Temporarily hide notifications of other apps in Android

I'm looking to manage the visible notifications of other apps. It looks like I can cancel notifications with a NotificationListenerService . Is there a way to only do so temporarily, and then show them again at a later time?

Until now I've been turning on DND to do this, but that hides all notifications (or whatever the user has configured DND to do). I'd like to give them the choice of what app notifications to hide, temporarily.

Would snoozeNotification do what I'm looking for? How would you then un-snooze a notification at a later time?

看起来像在短时间内再次调用 snoozeNotification 可以重新发出通知!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM