Where do I save photos and large files so that they're deleted on app uninstall?

StackOverflow https://stackoverflow.com/questions/23562190

  •  18-07-2023
  •  | 
  •  

سؤال

My Android app stores some photos and recordings taken by the user. Right now I'm simply saving them on the SD card which works, but it worries me, because once user uninstalls my app, his sd storage is polluted with my app's files.

Is there any special kind of storage in Android that I can use which is cleared once the app is uninstalled?

هل كانت مفيدة؟

المحلول

There is only a solution you should check first that your application is going to be un install and after satisfy your condition you should out your logic.

I hope that it overcome your problem. Please Go here.

نصائح أخرى

Unfortunately there is no such kind of storage in android where you can save your files which will be removed automatically when application is uninstalled.

Yes there is an storage available but there u can save some useful amount of data like config data which is user specific so that he can get acceess to it quickly but for storing large amount you have to use file systems only.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top