[英]Android Notifications disappear after some time
Android notifications disappear after some time, without touching it to cancel. 一段时间后,Android通知会消失,而无需触摸即可取消。 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. 确保没有任何其他服务或项目模块,该服务或项目模块执行以下调用NotificationManager.cancelAll()
来取消所有通知。 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. 始终使通知控制器保持唯一标识,并仅取消与该部分相关的通知总是更好的方法,因此,该代码不会触及其他项目部分发布的通知。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.