R
R
Repich2013-12-26 16:34:47
Android
Repich, 2013-12-26 16:34:47

Development for Android. Why is the widget not updated on the device, is everything correct in the emulator?

I am writing a simple widget with a TextView, I am trying to replace the inscription in the OnUpdate procedure, everything works correctly in the emulator, the inscription is installed immediately after launch, but on a real device it does not.
Here is a piece of code:
AppWidgetManager manager = AppWidgetManager.getInstance(context);
RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.widget);
remoteViews.setTextViewText(R.id.tv, "puff puff");
manager.updateAppWidget(appWidgetIds, remoteViews);

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question