Skip to content Skip to sidebar Skip to footer

Widget Not Showing Up After Phone Restart

I created a widget that works great until I restart the phone, then the widget doesn't display it is invisible but if i hold and click i can throw it in the garbage I have a functi

Solution 1:

When phone restart, it will call onEnable instead of onUpdate.

--update--

int[] allids = AppWidgetManager
    .getInstance(Context)
    .getAppWidgetIds(newComponentName(Context, YourAppWidgetProvider.class);

This will get all ids that is under the control of YourAppWigetProvider. Read more on this

Post a Comment for "Widget Not Showing Up After Phone Restart"