0

I have an application which saves magazines on sdcard. Now i want to delete all the downloaded magazines while application is being uninstall. Is there any way to do that problematically. Please suggest.

Dipak Keshariya
  • 22,193
  • 18
  • 76
  • 128
Richa Laad
  • 259
  • 5
  • 21

3 Answers3

2

If you create file using getExternalStorageDirectory() method it will delete the files belong to your application while delete application

see the below linl for creating file using that

Android how to use Environment.getExternalStorageDirectory()

Community
  • 1
  • 1
koti
  • 3,681
  • 5
  • 34
  • 58
0

while uninstalling any app from android phone..It provides an option "clear data" I think doing it would automatically remove your datas if you have created it through code.

Rekha
  • 901
  • 1
  • 11
  • 20
0

Please check link http://developer.android.com/guide/topics/data/data-storage.html#filesInternal

you save data folder: /Android/data//cache/ The is your Java-style package name, such as "com.example.android.app".

When uninstall application, data clear.

NhamPD
  • 3
  • 3