Hi Erel,
I'm trying to place a phone call with the speaker on, but I get always a Java error.
I tried, as your suggestion:
r.RunMethod("setSpeakerphoneOn2", true, "java.lang.boolean")
but I think I need use RunMethode2 because there are more that one parameter.
So i tried:
Dim pc As PhoneCalls
StartActivity(pc.Call(number))
Dim rr As Reflector
rr.Target = rr.GetContext
rr.RunMethod2("setSpeakerphoneOn2", True, "java.lang.boolean")
but I still get a Java error
rr.RunMethod2("setSpeakerphoneOn", True, "java.lang.boolean")
java.lang.IllegalStateException: View com.android.internal.policy.impl.PhoneWindow$DecorView@2be2f3a8 has already been added to the window manager.
Is correct "setSpeakerphoneOn2" ?
Is correct to pass True to RunMethod2 when it expect 3 strings parameters ?
I have also added this string to the Manifest:
AddPermission(android.permission.MODIFY_AUDIO_SETTINGS)
Many thanks in advance.
Fabrizio