Style-7
Style-7

Reputation: 1209

Widget added as the first by requestPinAppWidget and removed manually is not call onDisabled method for AppWidgetProvider

If you add a widget by requestPinAppWidget then onEnabled is call, but if you remove it from the Home screen onDisabled is not call (of course it is the last removed widget). What is wrong or it is a bug?

Upvotes: 0

Views: 466

Answers (1)

Gil Becker
Gil Becker

Reputation: 273

onDisabled is only called when the last AppWidget instance for this provider is deleted.

If you want to get a callback on any AppWidget being deleted, you must override onDeleted.

For more info see the official documentation.

Upvotes: 0

Related Questions