In this document, Google says that:
When the user uninstalls your app, the system removes all your app's files from internal storage.
But does it clear app cache (or any other data inside internal storage) automatically when update app version (for example from v1.0 to v1.1)?
Because when I'm monitoring my company's app, the /cache
folder goes down trend each time we release and users update to new app version.
I did a test on my phones and see that the app cache did decrease size. But I'm not sure all devices also be the same.
For all Android devices that do still use the system cache for applying system updates, it's typically a good idea to wipe the system cache partition on your Android after a successful system update. This ensures that your system updates never use outdated files or data.
Tap Clear data to clear app data and cache. You'll then have to select whether you want to clear all data associated with the app or just its cache. Clearing data will automatically clear the cache of the app as well.
No. Sometimes when it's required. Android cache cleaning is not necessary unless you're running out of storage space on your phone and you need to free up some.
Clearing your Android app cache can help fix speed issues and free up storage space. If you need more storage, clear the cache of the apps that take up the most space. Clearing your app cache every few months will help streamline your phone and keep it from getting too full.
Internal storage:
When the user uninstalls your app, the system removes all your app's files from internal storage.
External storage:
getExternalFilesDir()
and rightfully belong to your app and will be deleted when the user uninstalls your app.Yes, it clean data when user uninstalls, but NOT when user updates your app.
Note that some app does implement it's own cleaning mechanism by:
android.intent.action.PACKAGE_REPLACED
using BroadcastReceiver
, then trigger clean some specific data. For detailed information, see this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With