AppWidget Update

I run an action on a button button from an AppWidget. The user enters some activity data, and when the user closes this activity, I want to update the user data entered in the TextView on the AppWidget. Any idea how to do this? I successfully started working with AppWidget, only the problem is updating AppWidget.

+4
source share
1 answer

You can use RemoteViews and AppWidgetManager :

 AppWidgetManager manager = AppWidgetManager.getInstance(context); RemoteViews remoteViews = new RemoteViews( context.getPackageName(), R.layout.widget); remoteViews.setTextViewText(R.id.textBoxId, "new textbox content"); manager.updateAppWidget(appWidgetId, remoteViews); 
+4
source

All Articles