N
N
noslok2014-03-16 23:04:14
Android
noslok, 2014-03-16 23:04:14

How to store data in android app?

Hello.
I am learning android. I can't figure out how to implement the application.
I write something like RSS.
There is a user, he logs into the application - this data is obviously stored in the SharedPreference.
The user has a choice from several sources, infa from which gets into RSS. Where to store information about selected sources? In a database, or just in files? Couldn't find an answer anywhere.
And where and how to store the RSS cache (already loaded data displayed in the feed?)? Do a hybrid of the database and files (links to data files are stored in the database)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Starkov, 2014-03-16
@noslok

Have you read this? developer.android.com/guide/topics/data/data-stora...
For selected sources,
Store private primitive data in key-value pairs is best.
You can simply store the cache in memory until the application is unloaded (and this may not happen for a long time), let the data lie there.
So that he does not eat a lot of memory - write the simplest lru cache habrahabr.ru/post/136758

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question