I would like to add the ability for a user to launch the Add Widget activity to choose my application’s widget to add to their phone’s homescreen from within my application.
I was following this example: Android:NPE while trying to activityForResult with ACTION_APPWIDGET_PICK intent, but realized that I didn’t have the homescreens AppWidgetHost.
I know I need to use the AppWidgetManager.ACTION_APPWIDGET_PICK, but Android Developer says that I need to launch this from within my AppWidgetHost. If I am trying to get the appwidget onto the homescreen, this implies that I need to gain access to that instance of the AppWidgetHost. How would I get access to that or get that instance? Is it even possible to do anything with the homescreen’s AppWidgetHost?
You can’t. That’s not in your process.
Only if you are the home screen in question.
AFAIK, this is not supported.