I’m trying to reflect an Android class, we know it can be done because of other applications doing it but struggling to achieve the result ourselves.
We’re stuck at the below
Class<?> myClass = Class.forName("android.content.pm.PackageManager");
Method method = myClass.getMethod("deleteApplicationCacheFiles", String.class,IPackageDataObserver.class);
IPackageDataObserver.class doesn’t exist
import android.content.pm.IPackageDataObserver;
Also doesn’t work, I can manually get the code for the interfaces from Google and put them into the Package but that seems a little OTT, wondering if i’m missing something.
Thanks
Edit:
Add the IPackageDataObserver class to the project your self, its the only way to do this.
make a package in you source folder naming it “android.content.pm” and add this class to it, this class is just original android source code:
Rolf