Skip to content Skip to sidebar Skip to footer

How To Apply Changes To Widget When Placing It On The Homescreen In Onenabled?

When I try to put my weather widget on the homescreen I want to give the user an option of choosing a city at that moment and the widget starts showing the weather for that city. F

Solution 1:

I wouldn't rely on onEnabled to do things properly for you. As far as I know there is still a bug which allows for widgetIds to linger when widget configuration gets cancelled. This means that when you place a first widget and cancel the configuration, an Id is still stored in the system for the specific AppWidgetProvider, and thus onEnabled isn't called when you place it again since it still has a 'ghost' id already in its appWidgetProviderIds.


Post a Comment for "How To Apply Changes To Widget When Placing It On The Homescreen In Onenabled?"