【发布时间】:2012-04-07 01:56:29
【问题描述】:
在AppWidgetProvider 中使用 PendingIntent 时,我使用以下代码:
views.setOnClickPendingIntent( viewId,
PendingIntent.getBroadcast( context, 0, intent,
PendingIntent.FLAG_UPDATE_CURRENT ) );
因此,目前没有保留对 getBroadcast 方法返回的 PendingIntent 的引用。在特定情况下,我现在想取消 PendingIntent。有什么方法可以从视图中获取 PendingIntent 吗?或者是通过保持对它的引用来调用 PendingIntent 的取消方法的唯一方法?
【问题讨论】:
-
谢谢,Dheeraj!我现在有点着急,但我会尽快检查并尝试。干杯!
标签: android android-pendingintent