I have several JSON files programmatically saved using the Android Application I just created. I just wonder if the JSON files will be deleted physically after I uninstall my app. Does anybody have any idea? I would greatly appreciate if there is.
Asked
Active
Viewed 186 times
0
-
1Look at [this answer](http://stackoverflow.com/questions/1222269/how-to-delete-files-created-by-the-application-on-uninstall) basically the type of the file does not matter, only the paths where you are putting them do. – Flavien Volken Dec 23 '13 at 13:24
3 Answers
1
If you save file in your application CacheDir then it is automatically detect when you uninstall the application.
So, save file in sdcard folder without CacheDir folder.
Thanks
Md Abdul Gafur
- 6,169
- 2
- 26
- 37
1
I just wonder if the JSON files will be deleted physically after I uninstall my app.
If they are stored on internal storage, or in getExternalFilesDir(), or in getExternalCacheDir(), they will be removed on an uninstall.
CommonsWare
- 954,112
- 185
- 2,315
- 2,367
1
It depends on where you saved your JSON file, but it will be deleted if you save it to Internal Storage:
From the docs:
- It's always available.
- Files saved here are accessible by only your app by default.
- When the user uninstalls your app, the system removes all your app's files from internal storage.
See here.
Melquiades
- 8,466
- 1
- 29
- 43