I must make something like that. I run my application and press button "Create widget" and the widget is created on Home screen.
I don't know how to do it, Just i know how to take widget to home screen when i choose my widget in widgets menu and write text what i want in this widget And I know how to run ConfigureActivity on my application but when i writte some text and press add "widget" it don't create. I think i don't have any id's to create widget but how to get that? Random or something. I used in Android Studio New > Widget > App Widget.