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
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
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
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
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
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
6 matches
Mail list logo