开发者

Android, perform action when widget is clicked

开发者 https://www.devze.com 2023-01-27 07:17 出处:网络
Can someone provide me with an example of how to perform an action when the user taps on a widget? The only example I have found launches an activity. I assume that it must still do it with some sort

Can someone provide me with an example of how to perform an action when the user taps on a widget? The only example I have found launches an activity. I assume that it must still do it with some sort of pending intent 开发者_如何学编程and maybe a broadcast receiver, but I'm not sure how to do it.


Call RemoteViews.setOnClickPendingIntent on the views in your widget (assuming you have views in your widget).

0

精彩评论

暂无评论...
验证码 换一张
取 消