A
A
Artem2012-09-13 10:07:53
Android
Artem, 2012-09-13 10:07:53

Why might the widget from the Activity not be updated?

There is a widget. It is normally created, the configurator opens and the configurator settings are successfully applied. However, when I then reopen the activity configurator, I can't get the widget to update after saving the settings. Although I call at the end

appWidgetManager.updateAppWidget(widgetId, remoteViews);
and even send after ACTION_APPWIDGET_UPDATE:
appWidgetManager.updateAppWidget(widgetId, remoteViews);

Intent update = new Intent();
update.setAction(AppWidgetManager.ACTION_APPWIDGET_UPDATE);
update.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, new int[] {widgetId});
update.setData(Uri.parse(update.toUri(Intent.URI_INTENT_SCHEME)));
context.sendBroadcast(update);

Widget ID checked, the same when creating and when editing. I tried to specify Intent.setComponent () on the advice from foreign forums, it does not help. After the reboot, the widget appears in an already updated form. What else could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem, 2012-09-13
@bartwell

Yep, solved the problem. Missed an error in the logs !!! FAILED BINDER TRANSACTION !!!. The error occurs because the Bitmap does not fit into the internal bundle. Fixed with createScaledBitmap().

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question