Android Internal and External storage example – Store and Retrieve Data

person shubham sharmafolder_openAndroidlocal_offer, , , access_time February 1, 2017
  • Android Internal Storage 
    • Internal storage are private to your application and other applications cannot access them (nor can the user). When the user uninstalls your application, these files are removed.
  • Android External Storage
    •  External storage such as SD card can also store application data, there’s no security enforced upon files you save to the external storage. All applications can read and write files placed on the external storage and the user can remove them.

In this example we are going to save data from an EditText to both Internal Storage and External Storage, and then try to get the data back from the respective storage places.

Source for the Screen Layout – main.xml


 

Source for the Activity – AndroidStorageActivity.java

Original Post

warningComments are closed.