hello
i tried to run this solution ( i red the other posts on it)
my app is making a call .
when i run on debug and add break point it work. but when i run it in full mode the speaker not open.
Dim ctxt As JavaObject
ctxt.InitializeContext
Dim audioManager As JavaObject = ctxt.RunMethodJO("getSystemService", Array(ctxt.GetField("AUDIO_SERVICE")))
Dim audioManagerStatic As JavaObject
audioManagerStatic.InitializeStatic("android.media.AudioManager")
Dim originalMode As Int = audioManager.RunMethod("getMode",Null)
If value Then
audioManager.RunMethod("setMode", Array(audioManagerStatic.GetField("MODE_IN_CALL")))
Else
audioManager.RunMethod("setMode", Array(audioManagerStatic.GetField("MODE_NORMAL")))
End If
audioManager.RunMethod("setSpeakerphoneOn", Array(value))
' // restore original mode
audioManager.RunMethod("setMode", Array(originalMode))
Dim pc As PhoneCalls
StartActivity(pc.Call("01211111"))
any idea?
i tried to run this solution ( i red the other posts on it)
my app is making a call .
when i run on debug and add break point it work. but when i run it in full mode the speaker not open.
Dim ctxt As JavaObject
ctxt.InitializeContext
Dim audioManager As JavaObject = ctxt.RunMethodJO("getSystemService", Array(ctxt.GetField("AUDIO_SERVICE")))
Dim audioManagerStatic As JavaObject
audioManagerStatic.InitializeStatic("android.media.AudioManager")
Dim originalMode As Int = audioManager.RunMethod("getMode",Null)
If value Then
audioManager.RunMethod("setMode", Array(audioManagerStatic.GetField("MODE_IN_CALL")))
Else
audioManager.RunMethod("setMode", Array(audioManagerStatic.GetField("MODE_NORMAL")))
End If
audioManager.RunMethod("setSpeakerphoneOn", Array(value))
' // restore original mode
audioManager.RunMethod("setMode", Array(originalMode))
Dim pc As PhoneCalls
StartActivity(pc.Call("01211111"))
any idea?