You can use following ways to store app data:
- SQLite : It is a opensource SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. Hence it is rather easy to use.
Go through this link from Developer site for reference.
- Shared Preferences : SharedPreferences are used to save data based on key-value pair.
A preference file is actually a xml file saved in internal memory of device.
Every application have some data stored in memory in a directory
so whenever getSharedPreferences(String name,int mode) function get called it validates the file that if it exists or it doesn’t
then a new xml is created with passed name.
Go through this link from Developer site for reference.
- Internal Storage: This method is specifically for those situations where you need to store data to the device filesystem, but you do not want any other app (even the user) to read this data. Note that this data is deleted from the device when your app is uninstalled.
Go through this link from Developer site for reference.