how to save data in android

Saving and retrieving of data is one of the fundamental part of an android application. In android you can save your data by using any one of the following ways. 


1. Using shared preferences
2. Save into files.
3. Save into SD card.
4. Save as static data.
5. Save into sqlite database.

Using the SharedPreferences is the easiest way of saving data in android. Here data is saved using key-value pair. This method is suitable for saving small amount of information such as login details, password's etc. 
                Learn More about SharedPreferences

You can also save your data into a file in your phone memory. You can use this method of saving for those applications which closely work with the android OS. This is a better method of saving but the application fails to install or to save data when the device internal memory is too low.

A better way of saving large data is to use the external SD card. By using the external SD card for saving data, you can easily share the data with other devices. This method is suitable for saving media files like audio, video, images etc.  

If you want to save data during the design phase of the application then static data saving is the better option. This allow you to save data statically(before run)  for your application. This method is suitable for saving information such as help topics, licence agreements etc. 

The final option for data saving in android is to use the inbuilt database called the sqilite database. By using this option you can save data in the form of tables. You can use this option when you needs more control and securities over the data usage for your application.