thanks for reply i am extending correct class i think it may be due to the info being got in mainactivity and then requesting it from AppWidgetProvider class when app is closed but it should get info when app is launched but the widget stays empty just t be sure my xml is
manifest has
and xml/example_appwidget_info
A I JUST TRIED ON EMULATOR AND GOT A NULLPOINTER it seems my widgetPie which is a piechart setup in mainactivity must need to move things around
From the excerpts you posted I can't tell if you're going about this the right way. But "MainActivity" sounds like it might be an Activity, which is something you would never construct yourself. If it is is not an Activity, then it is not possible to advise what to check because we haven't seen enough of the code.
k so i think i could not use an image from mainactivity due to the app being closed and could not gather info from onupdate in widget class so i figure save as sharedpreferences now i dont get any null pointers and it seems to be saving and loading the string but the widget is just blank if anyone can tell me what im doing wrong
this is my output
so it seems the image is saved as string and loaded but its just blank in my widget