My app creates a folder in the sdcard. I wanna remove the folder when the app is uninstalling or when the app is notified to be uninstalled. Is anyway to make it?? Thanks in advance!!
Asked
Active
Viewed 258 times
2 Answers
1
use getExternalFilesDir() to get a directory on the SDCard that will be deleted when your app gets uninstalled.
http://developer.android.com/guide/topics/data/data-storage.html#filesExternal

SimonSays
- 10,867
- 7
- 44
- 59
1
Android at the moment does not give you a possibility to perform code at the moment your app is uninstalled.
All the settings that are set via the SharedPreferences are deleted together with everything in the Aplication Data an Cache folder.
The only thing that will persist is the data that is written to the SD-Card and any changes to phone settings that are made.

Chirag
- 56,621
- 29
- 151
- 198