Meroelyth
Meroelyth

Reputation: 5590

Android How to detect if a widget is enabled programmatically?

I'm working on a widget app, but I don't know how to check, from code, if a widget is enabled (placed on HomeScreen) programmatically.

Please help me.

Many thanks.

Upvotes: 1

Views: 2543

Answers (1)

Kenny C
Kenny C

Reputation: 2289

Your AppWidgetProvider has a method onEnabled where you can set a boolean variable. Look at this answer https://stackoverflow.com/a/11815421/661079

Upvotes: 1

Related Questions