user433825
user433825

Reputation:

Install widget from app

I'm trying to find a way to install a widget on the home screen/launcher, from my app, rather than from the launcher itself.

Since the default launcher doesn't seem to have a way to allow this I assume it's not.

Upvotes: 1

Views: 1497

Answers (2)

Oleksii Masnyi
Oleksii Masnyi

Reputation: 2912

Seems shortly we will have ability to pull widgets to home screen directly from app. See sources in Android 4.0.1

 public class InstallWidgetReceiver {
     public static final String ACTION_INSTALL_WIDGET =
             "com.android.launcher.action.INSTALL_WIDGET";

http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/4.0.1_r1/com/android/launcher2/InstallWidgetReceiver.java#InstallWidgetReceiver

Upvotes: 0

CommonsWare
CommonsWare

Reputation: 1006779

You cannot "install a widget on the home screen/launcher, from [your] app". Users can add app widgets to their home screen -- developers cannot force the issue.

Upvotes: 3

Related Questions