I\'m new to Java and Android development and I want to ask what are the available method to store a data to a persistent storage? Like for example I want to store a collecti
Data Storage
Android provides several options for you to save persistent application data. The solution you choose depends on your specific needs, such as whether the data should be private to your application or accessible to other applications (and the user) and how much space your data requires.
Your data storage options are the following:
Shared Preferences Store private primitive data in key-value pairs.
Internal Storage Store private data on the device memory.
External Storage Store public data on the shared external storage.
SQLite Databases Store structured data in a private database. Network Connection Store data on the web with your own network server.
As you said in your question itself you can use file or database.If more data is there then you can go for file and database(SQLITE) or else if small data then you can also go for SharedPreferences.Below is one link where its all about datastorage in android all from documentaion.Hope it will help you. :)
Here is link