I'm trying to run TTS but not speaks into bluetooth headset
I try this to determine if the headset bluetooth is connected
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
but return always false also if the headset is connected
i tried also to run this code
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
but speaking into bluetooth headset, the voice recognition do not works.
the curious thing is that the microphone of the mobile phone is actually off
I also added "android.permission.MODIFY_AUDIO_SETTINGS" permission in the manifest
			
			I try this to determine if the headset bluetooth is connected
			
				B4X:
			
		
		
		Sub IsBluetoothHeadsetOn As Boolean
    Dim r As Reflector
    r.Target = r.GetContext
    r.Target = r.RunMethod2("getSystemService", "audio", "java.lang.String")
    Return r.RunMethod("isBluetoothScoOn")
End Subbut return always false also if the headset is connected
i tried also to run this code
			
				B4X:
			
		
		
		Sub SetBluetooth(Value As Boolean)
    Dim r As Reflector
    r.Target = r.GetContext
    r.Target = r.RunMethod2("getSystemService", "audio", "java.lang.String")
    Dim mode As Int
    If Value Then mode = 2 Else mode = 0
     r.RunMethod2("setBluetoothScoOn" , True , "java.lang.boolean") 
End Subbut speaking into bluetooth headset, the voice recognition do not works.
the curious thing is that the microphone of the mobile phone is actually off
I also added "android.permission.MODIFY_AUDIO_SETTINGS" permission in the manifest
 
				 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		