Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This thread may be long dead but for those who might be trying the same thing, some notes from the AudioManager docs may be useful. It looks like the missing element is the startBluetoothSco() command but there are restrictions on the use of this channel. From the Android Dev site <a href="http://developer.android.com/reference/android/media/AudioManager.html#startBluetoothSco()" rel="noreferrer">here</a>:</p> <blockquote> <blockquote> <p>public void startBluetoothSco () Since: API Level 8 Start bluetooth SCO audio connection. </p> </blockquote> <p>Requires Permission: MODIFY_AUDIO_SETTINGS. </p> <p>This method can be used by applications wanting to send and received audio to/from a bluetooth SCO headset while the phone is not in call. </p> <p>As the SCO connection establishment can take several seconds, applications should not rely on the connection to be available when the method returns but instead register to receive the intent ACTION_SCO_AUDIO_STATE_CHANGED and wait for the state to be SCO_AUDIO_STATE_CONNECTED. </p> <p>As the connection is not guaranteed to succeed, applications must wait for this intent with a timeout. </p> <p>When finished with the SCO connection or if the establishment times out, the application must call stopBluetoothSco() to clear the request and turn down the bluetooth connection. </p> <p><strong>Even if a SCO connection is established, the following restrictions apply on audio output streams so that they can be routed to SCO headset: - the stream type must be STREAM_VOICE_CALL - the format must be mono - the sampling must be 16kHz or 8kHz</strong> </p> <p>The following restrictions apply on input streams: - the format must be mono - the sampling must be 8kHz </p> <p>Note that the phone application always has the priority on the usage of the SCO connection for telephony. If this method is called while the phone is in call it will be ignored. Similarly, if a call is received or sent while an application is using the SCO connection, the connection will be lost for the application and NOT returned automatically when the call ends.</p> <p>See Also stopBluetoothSco() ACTION_SCO_AUDIO_STATE_CHANGED</p> </blockquote> <p>Note that I have not tested this, I'm just passing along a lead I found in researching a similar project. I think Jayesh was close to the solution and the restrictions above may have been what was keeping it from working.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload