0

I'm saving pictures related to my app inside External files directory so In Gallery app Device Folder can't access those photos. but when I update app it removes the all data in the following directory.

/storage/emulated/0/Android/data/AppPackage/files
Got this path by the following line of code.
mContext.getExternalFilesDir(null)

Is there any way to stop this folder get removed on app update?
On app Uninstall can I show a warning dialog to user about data get deleted?

  • You can check this [link](https://stackoverflow.com/a/18816716/5308778) to detect app is going to uninstalled – yashkal Dec 08 '17 at 07:01

1 Answers1

0

here are two things
1) Installing build from android studio, as android studio uninstall the previous build and then install new one that is the actual reason that app folder got removed in the first place.
2) Updating app from playstore doesn't remove app data folder.