Search code examples
androidandroid-appwidget

Set App Widget to Home Screen programmatically


I want to set my custom app widget to home screen. I have searched a lot and implement code and also run some demo But in all that what happen after click on button widget can't be set to home screen instead going to menu setting from device click on

Add->Widgets->Then my widget Icon

after click on my widget icon it will be set to home screen.

But i don't need this i want that after click on button from my activity widget will be set to home screen without going here.

Add->Widgets->Then my widget Icon

So please help me for this approach.


Solution

  • i want that after click on button from my activity widget will be set to home screen without going here

    That is not possible.