public class RTCBluetoothManager
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
RTCBluetoothManager.State |
| Modifier | Constructor and Description |
|---|---|
protected |
RTCBluetoothManager(android.content.Context context,
RTCAudioManager audioManager) |
| Modifier and Type | Method and Description |
|---|---|
protected android.media.AudioManager |
getAudioManager(android.content.Context context)
Stubs for test mocks.
|
protected boolean |
getBluetoothProfileProxy(android.content.Context context,
android.bluetooth.BluetoothProfile.ServiceListener listener,
int profile) |
RTCBluetoothManager.State |
getState()
Returns the internal state.
|
protected boolean |
hasPermission(android.content.Context context,
java.lang.String permission) |
protected void |
logBluetoothAdapterInfo(android.bluetooth.BluetoothAdapter localAdapter)
Logs the state of the local Bluetooth adapter.
|
protected void |
registerReceiver(android.content.BroadcastReceiver receiver,
android.content.IntentFilter filter) |
void |
start()
Activates components required to detect Bluetooth devices and to enable
BT SCO (audio is routed via BT SCO) for the headset profile.
|
boolean |
startScoAudio()
Starts Bluetooth SCO connection with remote device.
|
void |
stop()
Stops and closes all components related to Bluetooth audio.
|
void |
stopScoAudio()
Stops Bluetooth SCO connection with remote device.
|
protected void |
unregisterReceiver(android.content.BroadcastReceiver receiver) |
void |
updateDevice()
Use the BluetoothHeadset proxy object (controls the Bluetooth Headset
Service via IPC) to update the list of connected devices for the HEADSET
profile.
|
protected RTCBluetoothManager(android.content.Context context,
RTCAudioManager audioManager)
public RTCBluetoothManager.State getState()
public void start()
public void stop()
public boolean startScoAudio()
public void stopScoAudio()
public void updateDevice()
protected android.media.AudioManager getAudioManager(android.content.Context context)
protected void registerReceiver(android.content.BroadcastReceiver receiver,
android.content.IntentFilter filter)
protected void unregisterReceiver(android.content.BroadcastReceiver receiver)
protected boolean getBluetoothProfileProxy(android.content.Context context,
android.bluetooth.BluetoothProfile.ServiceListener listener,
int profile)
protected boolean hasPermission(android.content.Context context,
java.lang.String permission)
protected void logBluetoothAdapterInfo(android.bluetooth.BluetoothAdapter localAdapter)