I used below code start bluetooth earphone, but the voice still come from speaker instead of bluetooth earphone when Mediaplayer play a media file, how can I play the Media ONLY from bluetooth earphone?
Sub StartBluetoothSco()
Dim r As Reflector
r.Target = r.GetContext
r.Target = r.RunMethod2("getSystemService", "audio", "java.lang.String")
r.RunMethod("startBluetoothSco")
r.Target = r.GetContext
r.Target = r.RunMethod2("getSystemService", "audio", "java.lang.String")
r.RunMethod2("setMode", 2, "java.lang.int")
End Sub
Sub StartBluetoothSco()
Dim r As Reflector
r.Target = r.GetContext
r.Target = r.RunMethod2("getSystemService", "audio", "java.lang.String")
r.RunMethod("startBluetoothSco")
r.Target = r.GetContext
r.Target = r.RunMethod2("getSystemService", "audio", "java.lang.String")
r.RunMethod2("setMode", 2, "java.lang.int")
End Sub