Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
AppWidgetProvider for configurable widget, onDelete example
@Override
public void onDeleted(Context context, int[] appWidgetIds) {
super.onDeleted(context, appWidgetIds);
WidgetEntryDao dao = new WidgetEntryDao(new DbHelper(context));
final int N = appWidgetIds.length;
for (int i = 0; i < N; i++) {
dao.deleteByWidgetId(appWidgetIds[i]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment