Cache cleaner app help

Hi everyone, I wanted to create an app to clean the cache of apps by selecting them from a list (as in the photo), how can I do it? and can it be done?


thanks

Unfortunately, this won't be possible with base App Inventor since it requires special permissions that we don't include in apps. However, extensions can add permissions outside of the ones we provide so it might be possible. One of the other users might be able to weigh in on what extensions are available.

1 Like

This example explains how to clear an app's cache using intents.

App Inventor's way to initiate intents is to use the ActivityStarter and might work to clear the cache of an individual app cache.

1 Like

Thank you for your reply
but is there any extension to clear the cache of other apps installed on the phone?

Why not search through the extensions listing here:

https://puravidaapps.com/extensions.php

1 Like

There is no extension that is right for me, they all talk about clearing the cache of the current app
Thank you for your suggestion

Works only for Android 10 and above versions

  • Get MANAGE_EXTERNAL_STORAGE permission

  • Start activity


This will clear cache of all apps at once.

1 Like

ok but does it also delete the cache of other apps installed on the phone?

Why?

It is written in docs.

1 Like

Read again the answer

Them try it and let us know, if it worked for you

Taifun

it doesn't work I'm using Android 12 with the ai2 companion,
I tried to see the cache from the settings for example of YouTube which is 702mb and after the "cleaning" it's still 702mb
what am I doing wrong?
thank you all
Cachecleaner.aia (1.8 KB)

Try this one:

See also here: How to request and grant MANAGE_EXTERNAL_STORAGE permission

1 Like

could you give me the aia file if possible?
so I can understand how it works
Thank you

Cachecleaner2.aia (5.3 KB)

You must build the APK, because this permission is not declared in the Companion's Manifest.

ok thanks a lot I'll try now

ok I think it works but is there a way to make it work on older versions of Android?

See also post #10 by @vknow360.

then no? I needed it to work on Android 9 too

and how can I select the apps I want to clean the cache? example:
image