On Thu, Jun 17, 2010 at 2:35 PM, CV <[email protected]> wrote: > I am using static Arrays and HashMaps to store some values in my > AppWidgetProvider class. But they are becoming null when the process > dies, so the widget does not work anymore. Are there any alternatives > to using static members to store data for an AppWidgetProvider in > Android?
You should not be attempting to keep an AppWidgetProvider's data in RAM, for the reasons you have discovered -- these objects have very short lifespans. If you have state you need to maintain, use a database or file. -- Mark Murphy CommonsWare [email protected] http://commonsware.com -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

