JohnC Expert Licensed User Longtime User Feb 27, 2022 #1 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();
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();
asales Expert Licensed User Longtime User Feb 27, 2022 #2 JohnC said: clear the application data of that other app? Click to expand... Another app? I wouldn't want another app to clear my app's data. I don't think Android allows this (I could be wrong). Check this: https://developer.android.com/reference/android/app/ActivityManager#clearApplicationUserData() Permits an application to erase its own data from disk. Upvote 0
JohnC said: clear the application data of that other app? Click to expand... Another app? I wouldn't want another app to clear my app's data. I don't think Android allows this (I could be wrong). Check this: https://developer.android.com/reference/android/app/ActivityManager#clearApplicationUserData() Permits an application to erase its own data from disk.
JohnC Expert Licensed User Longtime User Feb 27, 2022 #3 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
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.