开发者

How to start others application in Widgets click event?

开发者 https://www.devze.com 2023-01-10 10:42 出处:网络
I designed a widget and successful using \"setOnClickPendingIntent\" to active the click event, but I want to start other application witch is install in my Android phone (such as Google Map), how can

I designed a widget and successful using "setOnClickPendingIntent" to active the click event, but I want to start other application witch is install in my Android phone (such as Google Map), how can I using in this following command?

if (intent.getAction().equals(ACTION_WIDGET_CLICK)) { .... }

Beside that, My widget is a clock widget, I want to click a button to start the "system clock page" and clic开发者_StackOverflow社区k the date to the system Calendar. How can I make it? many thanks!


I want to start other application

There is no such concept in Android. You can start an activity via startActivity(), if there is a documented and supported Intent you can use to get to the activity you wish.

My widget is a clock widget, I want to click a button to start the "system clock page" and click the date to the system Calendar.

There is no "system Calendar" in Android. There is a Google Calendar client that is part of the Android open source project and exists on some phones, but it is not part of the Android SDK.

0

精彩评论

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

关注公众号