Hello friends I am trying to update a widget every user changes the text of texview Anyone can tell me how to do that? I do not know how to do it.
public class MyWidget extends AppWidgetProvider {

public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
super.onReceive(context, intent);

if (intent.getAction().equals(MyService.NEW_DATA)) {

RemoteViews remote = new RemoteViews(context.getPackageName(), R.layout.widget_layout);
remote.setTextViewText(R.id.txtValue, text)
ComponentName widget = new ComponentName(context, MyWidget.class);
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);
appWidgetManager.updateAppWidget(widget, remote);

I suppose that there is some method to take the text in textview and update the widget with that text!!
I am very confused!!