How to clear cache of particular app

I want clear cache option in my app. So if user click on button1 then cache of YouTube will clear

Please help me out

Thankyou!!!

1 Like

I think you can’t clear cache programmatically
But you can redirect user to App manager settings.
Where user can click on clear cache.
Use my extension App Settings for that.

1 Like

But this is possible in android studio but not In kodular :disappointed:

Do you have the java code?

Starting from Android 6.0 (Marshmallow) any normal app is not permitted to clear the cache of other apps.

2 Likes

No this possible becoz app like cleaner master and all-in tool toolbox app their do

In our settings there is clear cache option which delete all cache. Is there extension on button click it will delete cache without redirect to settings like cleaner master app

I think you didn’t read all answer in the link that I gave you. Clean Master or CCleaner on Android 6.0 and above it asks the user to access to Accessibility Service to clean device cache.


The only method to clean other apps cache on Android 6.0 and above is this.

I hope I gave you enough information.

PS: if you have Android 6.0 and above, try to download CCleaner and you will see. :wink:

:sweat_smile: Yes after getting Accessibility service permission how can I do ??? Any idea about it

For clearing cache of particular App, delete this dir

/storage/emulated/0/Android/data/package_name/cache

Credit : Vknow360

2 Likes

The cache folder is empty 90% of the cases, so I don’t think deleting that folder will actually clear the cache.
@Maxtern is this method works for you?

This is the only working method till now, AFAIK

1 Like

Yes it’s work perfectly I say want to clear cache of particular. :slightly_smiling_face:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.