There are three persistence technologies available on Android:
- Ordinary file storage;
- SharedPreferences based on XML format
- Lightweight relational database SQLite
Among them, the open source ORM framework LitePal can be used to improve the efficiency when operating the database SQLite.
source code
See the source code: https://github.com/optor666/first-line-code-of-android/tree/master/chapter06