How to launch activity from android home screen widget

前端 未结 2 1581
北恋
北恋 2020-12-11 05:27

I am desperately trying to get my head wrapped around how to implement home screen widgets. Right now, I (finally) was able to get a button on my widget respond to a button

2条回答
  •  离开以前
    2020-12-11 06:01

    Well, your app widget should already have a PendingIntent that you tied to the button. Instead of a PendingIntent that triggers a BroadcastReceiver, have it be a PendingIntent that starts up an Activity.

提交回复
热议问题