Reputation: 1476
I am currently developing a simple info app on various university campuses. I want the app to operate predominantly in an offline state thus I want to store all my information locally. The data within the app will not be subject to any change thus I was wondering what the best (practice) method was to store such data? Basically should I be storing the info in a SQLite db, java file or xml?
Upvotes: 1
Views: 1950
Reputation: 1
We had a University project requiring a local database on an android phone. What whe did was to use SQLite to write on a database stored on the memory stick. (We couldn't find the right permissions to write directly on the file system)
Check the API website for the android.database.sqlite package first.
And here for a nice tutorial : http://www.devx.com/wireless/Article/40842
Upvotes: 0
Reputation: 189454
It depends on the data you have. If it is largely text I would store it in an android string resource file. If it is somehow structured and has IDs and relations store it in a database.
Upvotes: 1
Reputation: 77995
The answer depends on your requirements, but because of the built-in integration with SQLite, the easiest will probably be to just use SQLite, plus you get the benefits of a relational database. You can refer to the Notepad tutorial for a start.
Upvotes: 1