Android Question How to clear application data for another app?

JohnC

Expert
Licensed User
Longtime User
If I know the package name of another app on the device, how can I programmically clear the application data of that other app?

Note: I did find this, but I don't know how to convert it to B4A:

((ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE)).clearApplicationUserData();
 

JohnC

Expert
Licensed User
Longtime User
Ah, I see that that command will only work for the data in my own app.

I found another way to do it using ADB "pm clear package.name"

So maybe I will try to use Phone.Shell to do it for another app.
 
Upvote 0
Top