Delete all cached file after uninstall Android app

Overview

When running app, app will create a lot of cached files. If user uninstall app, I think that these files need to be removed. I suggest a solution for this issue:

  • Write cached file to External Cached Directory
  • If the user uninstalls your application, these files will be automatically deleted.

 

How to implement

You can also access a cache directory on a secondary external storage (if available) by calling ContextCompat.getExternalCacheDirs()

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s