The Different Data Storage Options Available On Android:: Pairs
The Different Data Storage Options Available On Android:: Pairs
(a). SQLite: Android provides full support for SQLite databases. Any
database you create is accessible only by your app.
The data is not naturally accessible to other apps.
Modes:
● MODE_PRIVATE
● MODE_APPEND
● MODE_WORLD_READABLE
● MODE_WORLD_WRITABLE
Initialization:
SharedPreferences pref =
getApplicationContext().getSharedPreferences("MyPref",Context.MODE_P
RIVATE);
Storing data:
editor.putString("key_name", "string value"); // Storing string
editor.putInt("key_name", "int value"); // Storing
integer