i want to identify whether a notification with id 1 is already there in notification bar or not ? if it's not then do some activity else display error ! Is it possible ? how ?
最佳答案
没有办法完全按照您要求做的事情(基于 id)。一旦您发布了通知,您就失去了对用户是否已关闭通知或通知仍然存在的引用。您可以做一些事情,但它们都是不可靠或没有弹性的黑客行为。也许如果您可以详细说明原因,或者您具体想要完成什么(总体),那么就有可能提供更多帮助。
关于android - 检查是否存在相同id的通知?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13645179/