将整数从 Android 主屏幕小部件传递到 Android 主屏幕打开的 Activity

发布于 2024-09-05 14:39:18 字数 72 浏览 3 评论 0原文

我们如何将 Android 主屏幕小部件信息(也许是 putExtra )传递给 Activity。什么特定的回调方法将处理这个?

How can we pass Android Home Screen Widget info ( putExtra maybe ) to an Activity.. What particular method callback will handle this one?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

独行侠 2024-09-12 14:39:21

对您放置在 PendingIntent 中的 Intent 使用 putIntExtra()

似乎当我将 putIntExtra 放在
Intent,它不会更新它
正确地

在创建 PendingIntent 时尝试使用 FLAG_UPDATE_CURRENT

Use putIntExtra() on the Intent you place in the PendingIntent.

seems that when I place putIntExtra on
the Intent, it doesnt update it
properly

Try using FLAG_UPDATE_CURRENT when you create your PendingIntent.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文