I have a widget working with my app. When the app is first started I keep the context, and values so I can call my UpdateWidget() from the app when things change. But if the app doesnt know what the context and AppID is I dont know how to get that information. I think the way I tried to do this is wrong anyway, but not sure what else to try.
So basically the widget is already on the desktop. I start up the app and make some changes and I need to send an update to the app with the new info.
I would have thought the app would get this connection to the widget when it starts up, but not the case.
@Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
Toast.makeText(context, "onUpdate", Toast.LENGTH_SHORT).show();
Ct = context;
ApMgr = appWidgetManager;
WidgetID = appWidgetIds;
WidgetOn = true;
UpdateWidget();
}