Shared preferences allow storing private primitive data in key-value pairs that persists locally even when the app is closed. The data is accessible throughout the app. To use shared preferences, call getSharedPreferences() to get an instance, then use edit() to putString/commit values.
SQLite is Android's built-in SQL database that stores data to a text file. The SQLiteOpenHelper class manages database creation and updating. Tables can be created and rows inserted, read from, and updated. Room, ORMLite, and GreenDAO are popular ORM libraries that provide an abstraction layer over SQLite.
Permissions for dangerous resources like location must be requested at runtime in Android 6.0+. Check if the permission is granted
Related topics: