I’m trying to send a variable from my main activity to a widget. I can do this by changing:
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds)
to
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds, String mValue)
And adding the variable when I call onUpdate in my main activity. However this seems to break the functionality of items in the widget. Is there a better way?
And call `myUpdate’ instead of ‘onUpdate’ in you Activity.