APhotoManager icon indicating copy to clipboard operation
APhotoManager copied to clipboard

On recent android versions processed photos may be removed after app uninstall

Open k3b opened this issue 6 years ago • 0 comments

In https://developer.android.com/training/camera/photobasics

i read

> Note: Files you save in the directories provided by 
> `getExternalFilesDir()` or `getFilesDir()` are deleted 
> when the user uninstalls your app.

Solution: from https://stackoverflow.com/questions/9726990/keep-files-after-uninstallation-of-android-app

You can put files in a directory derived from Environment.getExternalStorageDirectory(). These files will persist after an uninstall. However, a user can delete those files any time they like, regardless of whether your app is installed or not.

Other than that, there is no place on the device that you can place files that will survive an uninstall.

see also

  • https://stackoverflow.com/questions/56468539/getexternalstoragepublicdirectory-deprecated-in-android-q
  • https://commonsware.com/blog/2019/04/22/death-external-storage-more-story.html
  • https://stackoverflow.com/questions/54516769/how-to-write-files-to-sdcard-that-will-not-be-deleted-if-app-is-uninstalled

k3b avatar Jul 17 '19 11:07 k3b