The solution (as with most things), was to RTFM. If you look at the documentation for BroadcastReceiver (Which AppWidgetProvider is extended from), you would see:
A BroadcastReceiver object is only valid for the duration of the call to onReceive(Context, Intent)
.
So that pretty much solved why my local variables were disappearing each time. I figured that appwidgets had funky lifetimes, I just didn't know where to look.
No comments:
Post a Comment