I would like to know about how to delete a folder once user select uninstall button for my application. I want it by programmatically is there any chance to do it... If so let me know possible solution for it. thanks in advance.
If you created any folders on a device's external storage... there is no way for you to call code when the user uninstalls your app. Certain things are removed automatically (databases, anything written to Internal Storage), but not folders on external storage.
EDIT - As pointed out by Stephan, if you are targeting API Level 8 or higher, you can use Context.getExternalFilesDir() for your external files and those will be removed on uninstall.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With