A few days ago i had problems with an app and wanted to clear the app data. Usually you can do that under “Settings> Apps>”Name of the app” > STORAGE> CLEAR DATA
I don’t really remember why, but i clicked on the Google app and i discovered that it doesn’t have “Clear Data” but “Manage Space“. When you click on it, it will open an activity from the Google App where you can choose which data you want to delete.
So i got curious how this works.



How to implement this?

All you need to do is to add android:manageSpaceActivity to the inside your Manifest.xml and the name of the activity that should be used.

Now the settings app will display the “Manage Space” Button for your app and open the linked activity, where you can provide your users specific options to delete the data of your app.

Example Project

You can find the example app at https://github.com/Foso/JKManageSpaceActivity