[android-developers] Re: in-memory caching?

2011-07-06 Thread fluxtah
You could store it in a static variable if its just that list but if you want something more then there is currently no decent caching mechanism out of the box, you would have to roll your own. For a run down of data storage options you could look here: http://developer.android.com/guide/topics/d

[android-developers] Re: in-memory caching?

2011-07-05 Thread Daniel Drozdzewski
On Jul 5, 5:26 pm, doles wrote: > Hello, > > How is in-memory caching achieved in android? For example, i have static > data such as state list in the United States. I would like to keep that list > in a file or somewhere in an online service. However, when the app is > running, I'd rather store

Re: [android-developers] Re: in-memory caching?

2011-07-05 Thread Sachin Dole
Thank you everyone! It sounds like there are quite a few ways of fetching and storing data. For caching though, it sounds like the platform is open just as java is. I will likely use a singleton class that holds static members to hold my data. Thank you again. On Tue, Jul 5, 2011 at 4:06 PM, Kees

[android-developers] Re: in-memory caching?

2011-07-05 Thread Kees Jongenburger
Hi On Tuesday, July 5, 2011 6:26:42 PM UTC+2, doles wrote: > > Hello, > > How is in-memory caching achieved in android? For example, i have static > data such as state list in the United States. I would like to keep that list > in a file or somewhere in an online service. However, when the app i

[android-developers] Re: in-memory caching?

2011-07-05 Thread Doug
On Jul 5, 9:26 am, doles wrote: > How is in-memory caching achieved in android? You could apply any technique that works with Java in general. Android/Dalvik doesn't impose anything on your caching scheme than other Java implementations. You probably just have less active memory to work with. D

[android-developers] Re: in-memory caching?

2011-07-05 Thread Streets Of Boston
Assign a list/collection/set of states to a static (global) variable of a java class that appropriately deals with these. You could assign this static variable at start-up or just assign and load the list lazily (i.e. when the list is first needed). public class State { private static List s