/**@class android.bluetooth.BluetoothHearingAid implements android.bluetooth.BluetoothProfile @extends java.lang.Object This class provides the public APIs to control the Hearing Aid profile. <p>BluetoothHearingAid is a proxy object for controlling the Bluetooth Hearing Aid Service via IPC. Use {@link android.bluetooth.BluetoothAdapter#getProfileProxy} to get the BluetoothHearingAid proxy object. <p> Android only supports one set of connected Bluetooth Hearing Aid device at a time. Each method is protected with its appropriate permission. */ var BluetoothHearingAid = { /** Intent used to broadcast the change in connection state of the Hearing Aid profile. Please note that in the binaural case, there will be two different LE devices for the left and right side and each device will have their own connection state changes.S <p>This intent will have 3 extras: <ul> <li> {@link #EXTRA_STATE} - The current state of the profile. </li> <li> {@link #EXTRA_PREVIOUS_STATE}- The previous state of the profile.</li> <li> {@link android.bluetooth.BluetoothDevice#EXTRA_DEVICE} - The remote device. </li> </ul> <p>{@link #EXTRA_STATE} or {@link #EXTRA_PREVIOUS_STATE} can be any of {@link #STATE_DISCONNECTED}, {@link #STATE_CONNECTING}, {@link #STATE_CONNECTED}, {@link #STATE_DISCONNECTING}. <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission to receive. */ ACTION_CONNECTION_STATE_CHANGED : "android.bluetooth.hearingaid.profile.action.CONNECTION_STATE_CHANGED", /** Intent used to broadcast the selection of a connected device as active. <p>This intent will have one extra: <ul> <li> {@link android.bluetooth.BluetoothDevice#EXTRA_DEVICE} - The remote device. It can be null if no device is active. </li> </ul> <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission to receive. @hide */ ACTION_ACTIVE_DEVICE_CHANGED : "android.bluetooth.hearingaid.profile.action.ACTIVE_DEVICE_CHANGED", /** This device represents Left Hearing Aid. @hide */ SIDE_LEFT : "null", /** This device represents Right Hearing Aid. @hide */ SIDE_RIGHT : "null", /** This device is Monaural. @hide */ MODE_MONAURAL : "null", /** This device is Binaural (should receive only left or right audio). @hide */ MODE_BINAURAL : "null", /** Indicates the HiSyncID could not be read and is unavailable. @hide */ HI_SYNC_ID_INVALID : "null", /**Initiate connection to a profile of the remote bluetooth device. <p> This API returns false in scenarios like the profile on the device is already connected or Bluetooth is not turned on. When this API returns true, it is guaranteed that connection state intent for the profile will be broadcasted with the state. Users can get the connection state of the profile from this intent. <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN} permission. @param {Object {BluetoothDevice}} device Remote Bluetooth Device @return {Boolean} false on immediate error, true otherwise @hide */ connect : function( ) {}, /**Initiate disconnection from a profile <p> This API will return false in scenarios like the profile on the Bluetooth device is not in connected state etc. When this API returns, true, it is guaranteed that the connection state change intent will be broadcasted with the state. Users can get the disconnection state of the profile from this intent. <p> If the disconnection is initiated by a remote device, the state will transition from {@link #STATE_CONNECTED} to {@link #STATE_DISCONNECTED}. If the disconnect is initiated by the host (local) device the state will transition from {@link #STATE_CONNECTED} to state {@link #STATE_DISCONNECTING} to state {@link #STATE_DISCONNECTED}. The transition to {@link #STATE_DISCONNECTING} can be used to distinguish between the two scenarios. <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN} permission. @param {Object {BluetoothDevice}} device Remote Bluetooth Device @return {Boolean} false on immediate error, true otherwise @hide */ disconnect : function( ) {}, /**{@inheritDoc} */ getConnectedDevices : function( ) {}, /**{@inheritDoc} */ getDevicesMatchingConnectionStates : function( ) {}, /**{@inheritDoc} */ getConnectionState : function( ) {}, /**Select a connected device as active. The active device selection is per profile. An active device's purpose is profile-specific. For example, Hearing Aid audio streaming is to the active Hearing Aid device. If a remote device is not connected, it cannot be selected as active. <p> This API returns false in scenarios like the profile on the device is not connected or Bluetooth is not turned on. When this API returns true, it is guaranteed that the {@link #ACTION_ACTIVE_DEVICE_CHANGED} intent will be broadcasted with the active device. <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN} permission. @param {Object {BluetoothDevice}} device the remote Bluetooth device. Could be null to clear the active device and stop streaming audio to a Bluetooth device. @return {Boolean} false on immediate error, true otherwise @hide */ setActiveDevice : function( ) {}, /**Get the connected physical Hearing Aid devices that are active <p>Requires {@link android.Manifest.permission#BLUETOOTH} permission. @return {Object {java.util.List}} the list of active devices. The first element is the left active device; the second element is the right active device. If either or both side is not active, it will be null on that position. Returns empty list on error. @hide */ getActiveDevices : function( ) {}, /**Set priority of the profile <p> The device should already be paired. Priority can be one of {@link #PRIORITY_ON} orgetBluetoothManager {@link #PRIORITY_OFF}, <p>Requires {@link android.Manifest.permission#BLUETOOTH_ADMIN} permission. @param {Object {BluetoothDevice}} device Paired bluetooth device @param {Number} priority @return {Boolean} true if priority is set, false on error @hide */ setPriority : function( ) {}, /**Get the priority of the profile. <p> The priority can be any of: {@link #PRIORITY_AUTO_CONNECT}, {@link #PRIORITY_OFF}, {@link #PRIORITY_ON}, {@link #PRIORITY_UNDEFINED} @param {Object {BluetoothDevice}} device Bluetooth device @return {Number} priority of the device @hide */ getPriority : function( ) {}, /**Helper for converting a state to a string. For debug use only - strings are not internationalized. @hide */ stateToString : function( ) {}, /**Get the volume of the device. <p> The volume is between -128 dB (mute) to 0 dB. @return {Number} volume of the hearing aid device. @hide */ getVolume : function( ) {}, /**Tells remote device to adjust volume. Uses the following values: <ul> <li>{@link AudioManager#ADJUST_LOWER}</li> <li>{@link AudioManager#ADJUST_RAISE}</li> <li>{@link AudioManager#ADJUST_MUTE}</li> <li>{@link AudioManager#ADJUST_UNMUTE}</li> </ul> @param {Number} direction One of the supported adjust values. @hide */ adjustVolume : function( ) {}, /**Tells remote device to set an absolute volume. @param {Number} volume Absolute volume to be set on remote @hide */ setVolume : function( ) {}, /**Get the CustomerId of the device. @param {Object {BluetoothDevice}} device Bluetooth device @return {Number} the CustomerId of the device @hide */ getHiSyncId : function( ) {}, /**Get the side of the device. @param {Object {BluetoothDevice}} device Bluetooth device. @return {Number} SIDE_LEFT or SIDE_RIGHT @hide */ getDeviceSide : function( ) {}, /**Get the mode of the device. @param {Object {BluetoothDevice}} device Bluetooth device @return {Number} MODE_MONAURAL or MODE_BINAURAL @hide */ getDeviceMode : function( ) {}, };