简体   繁体   中英

Android Notifications disappear after some time

Android notifications disappear after some time, without touching it to cancel. What could cause this kind of problem? The notification is started in a Service. Is that possible that the low memory causes this kind of problem?

Make sure that there is no any other service or project module, which does the following call NotificationManager.cancelAll() to cancel all the notifications. It is always better to keep the notifications controller over Unique ID and cancel only the notifications which are related to that part, by this the code won't touch the notifications posted by other project parts.

NotificationManager documentation.

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