Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 android 的 appwidget 中,有没有办法将多个待处理的意图设置为一个按钮?目前,它只识别我声明的最后一个意图。
在 android 的 appwidget 中,有没有办法将多个待处理的意图设置为一个按钮?
不,对不起。PendingIntent每个只有一次点击View。
PendingIntent
View
您可以链接待处理的意图以在下一个意图完成工作时触发它,这就是我的做法。我有一个小部件可以触发一个pendingIntent 来启动一项服务,该服务在完成后又会触发另一个Intent。或者,您可以让 pendingIntent 启动一个产生多个意图的服务。