penguru
penguru

Reputation: 4370

Android permanent storage

I want to create a file and I don't want it to be deleted when the application data is cleared. Is there a way for this in android, something like permanent storage ?

Upvotes: 1

Views: 1906

Answers (2)

MSaudi
MSaudi

Reputation: 4652

You can use SQLite for permanent storage. It will do the job perfectly. Avoid using GetExternalFilesDir() if you do not want the data to be deleted when the application removed.

This tutorial from Google will tell you about all options for storage Data Storage in Android

Upvotes: 0

Graham Borland
Graham Borland

Reputation: 60681

Yes, you can save to external storage (typically the SD card). See the section in the docs entitled Saving files that should be shared:

If you want to save files that are not specific to your application and that should not be deleted when your application is uninstalled, save them to one of the public directories on the external storage.

Upvotes: 2

Related Questions