I have 2 versions of the application, free and paid, but they save the code separately. I finally moved the code to a library that both are referencing to make code support easier.
I found that changing AppwidgetProvider
caused the launcher to remove all existing widgets, so I moved these classes from the library to keep the provider the same so that users do not have to recreate their widgets. The launcher no longer removes widgets, but instead they simply do not appear after the update.
If I call AppWidgetManager.getAppWidgetIds
for the component name, as always, appwidgetid still exists. The appwidgetprovider application and service are still called to update the widget, and /data/system/appwidgets.xml
still shows the widget, but the launcher does not display it.
This is not that it is invisible, since a long press on the location of the widget brings up a selection of wallpapers. I can create new widgets just fine, but I donβt want to upset users by asking them to recreate their widgets. Logs do not display errors triggered by the launcher or AppwidgetService
.
Any ideas why the widget stops rendering after updating? This has something to do with moving most of the code to a separate library. Thanks!
Edit: I am testing an emulator, api level 15, stock launcher
source share