在我们的应用OneBusAwayAndroid(open-sourceonGithub)中,我们需要在用户关闭特定提醒通知时收到通知,因此我们不会为同一事件发布另一个提醒通知(他们的巴士到达还有多长时间)。我们通过监听Intent来做到这一点。在我们的应用程序中,注册为DeleteIntent与Notification.当用户关闭通知时(通过滑动它,或点击通知窗口中的清除按钮),我们的应用程序应该收到Intent.从测试来看,似乎与thecurrentversiononGooglePlay(和currentmasterbranchonGithub),在以下Android版本中,我们的应
我在我的应用程序中实现GCM并保留通知的哈希值以跟踪通知栏中的内容(我必须根据用户是在应用程序中还是不在应用程序中来更改Intent)。我为所有通知设置了deleteIntentPendingIntent。所有这一切都是从我的本地哈希中删除通知,这样它就不会再更新了。如果我全部清除或滑动以删除通知,则Intent会被很好地触发。但是,我还将通知设置为自动取消。单击通知不会触发我的通知的deleteIntent。我的问题是,当我的通知被自动取消时,有什么方法可以得到通知吗? 最佳答案 这个错误hasbeenreported,但它看起来
我正在尝试检测我的通知何时被清除。我的问题直接引用这个answer这概述了我应该做的事情。这就是我执行这些操作的方式://usualNotificationinitializationherenotification.deleteIntent=PendingIntent.getService(context,0,newIntent(context,CleanUpIntent.class),0);notificationManager.notify(123,notification)这是CleanUpIntent类:classCleanUpIntentextendsIntentServi
我正在尝试检测我的通知何时被清除。我的问题直接引用这个answer这概述了我应该做的事情。这就是我执行这些操作的方式://usualNotificationinitializationherenotification.deleteIntent=PendingIntent.getService(context,0,newIntent(context,CleanUpIntent.class),0);notificationManager.notify(123,notification)这是CleanUpIntent类:classCleanUpIntentextendsIntentServi