-1

I have tried to delete the my folder from the SD card when app is uninstalled, but I didn't find that the app is uninstalled. Can anyone help me?

Peter
  • 1,674
  • 4
  • 27
  • 44
Jana Jana
  • 21
  • 3
  • 4
    Possible duplicate of [Perform a task on uninstall in android](http://stackoverflow.com/questions/3013823/perform-a-task-on-uninstall-in-android) – 1615903 Nov 23 '15 at 11:04
  • Could you add to your question any code that you have tried to get this working please. – Peter Nov 23 '15 at 11:14

1 Answers1

1

Usually there is not need to do such a task. Application specific files should be stored in an application directory.

You can get such a directory via getExternalFilesDir or getFilesDir (). There are some other dirs. Take a look at the ContextWrapper class for more information.

The files inside these dirs will be deleted when the application is uninstalled.

daemmie
  • 6,361
  • 3
  • 29
  • 45