dimanche 6 mars 2016

Android: Class in source code not found

I am trying to access the PhoneInterfaceManager.java on android.
As it is not part of the sdk, I need to use reflection. (I know I shouldn't do this, but as far as I know there is no other way).
The full name of the class is "com.android.phone.PhoneInterfaceManager".

Now when I run this code...

Object getPhoneInterfaceManager() throws ClassNotFoundException{
    return Class.forName("com.android.phone.PhoneInterfaceManager");
}

...I get:

java.lang.ClassNotFoundException: com.android.phone.PhoneInterfaceManager

Note: I checked the grep repository (which I find to be more reliable sometimes) and noticed that while the package for classes which worked with reflection were in the project "com.google.android / android", this class was to be found in "com.google.android / android-apps ". I don't know if this might mean something, but I thought I'd mention it anyway.

Thanks for your help in advance!





Aucun commentaire:

Enregistrer un commentaire