0
I would like to create a feature in the App to automatically add the Widget
of the application.
When the user clicks on a button, it automatically inserts the Widget
on the home screen.
It is possible?
0
I would like to create a feature in the App to automatically add the Widget
of the application.
When the user clicks on a button, it automatically inserts the Widget
on the home screen.
It is possible?
0
Unable to insert the widget automatically, you can open the widget selection for the user to choose from the click on the button:
Intent pickIntent = new Intent(AppWidgetManager.ACTION_APPWIDGET_PICK);
pickIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetID);
startActivityForResult(pickIntent, KEY_CODE);
It seems to go against some policies of Android, as this opens several security loopholes without the user’s consent.
More information on the links below:
Browser other questions tagged android widget
You are not signed in. Login or sign up in order to post.
I see no problem in negativizing my question... but why negatively answer without any explanation? =/
– Thiago Luiz Domacoski
I didn’t understand either, both in the question and in the answer.
– Vitor Henrique