Sub ENDCALL
If howend="EndCall" Then 'AVER>27
Dim ctxt As JavaObject
ctxt.InitializeContext
Dim tm As JavaObject = ctxt.RunMethod("getSystemService", Array("telecom"))
Dim success As Boolean = tm.RunMethod("endCall", Null)
If success=False Then
Dim success As Boolean = tm.RunMethod("endCall", Null)
End If
Else
KillCall
End If
End Sub
Sub KillCall
Dim r As Reflector
r.Target = r.GetContext
Dim TelephonyManager, TelephonyInterface As Object
TelephonyManager = r.RunMethod2("getSystemService", "phone", "java.lang.String")
r.Target = TelephonyManager
TelephonyInterface = r.RunMethod("getITelephony")
r.Target = TelephonyInterface
r.RunMethod("endCall")
End Sub