Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hiding android widget

Tags:

android

widget

I have created a few home screen widgets for my Android application. I would like to disable or enable some of these widgets from being added to the home screen based on some of the user's settings in my database.

Is it possible to dynamically disable/enable the user from adding certain widgets from my application?

like image 345
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzz Avatar asked May 19 '26 12:05

zzzzzzzzzzzzzzzzzzzzzzzzzzzzzz


1 Answers

Is it possible to dynamically disable/enable the user from adding certain widgets from my application?

If you disable/enable the <receiver> component via PackageManager, that should cause those app widgets to be unavailable from the menu... but it probably also screws up any outstanding instances of those app widgets.

like image 199
CommonsWare Avatar answered May 22 '26 01:05

CommonsWare