Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 287
Prakhs Avatar asked Dec 29 '10 12:12

Prakhs


1 Answers

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.

like image 102
Peter Knego Avatar answered Oct 11 '22 16:10

Peter Knego