0

I want to find out when my application is unistall and want to delete its related files from sd card: saved in getExternalStorageDIRECTORY()/MYNAME/FILES

i cant save it in data/data/folder path.

please suggest is it possible and how?

Android Priya
  • 686
  • 1
  • 6
  • 23

2 Answers2

1

you should use getExternalFilesDir, android will take care of the clean up at uninstallation time. The min api level required is 8

Blackbelt
  • 156,034
  • 29
  • 297
  • 305
0

Hi You have to receive the app-unistallization state using BroadCastReceiver.. The Receiver part will call inside the onReceive you can deleted the folder.

Sivakumar
  • 633
  • 4
  • 9