简体   繁体   中英

Launch Android Widget from Activity

Is there any way we can launch the android widget from our application immediately application installation or by showing button(eg:- 'Add Widget') within the application. So it like automatically add widget to our home screen using code.

Thanks Prakhs

I'm not sure I understand the question fully, but I'll give it a try:

  1. There is no way to start an application automatically after it was installed.

    There is the ACTION_PACKAGE_ADDED Broadcast Intent, but the application being installed doesn't receive this.

  2. Android applications can not add App Widgets to the home screen. Applications can define App Widgets, but user has to add them manually to the home screen.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM