getProfileConnectionPolicies
abstract suspend fun getProfileConnectionPolicies( profile: BluetoothDeviceProfile, deviceConnectionState: BluetoothConnectivityStatus.BluetoothConnectionState? = null, deviceBondState: BluetoothConnectivityStatus.BluetoothBondState? = null): Map<BluetoothDeviceAddress, BluetoothProfileConnectionPolicy>
Content copied to clipboard
Retrieves the platform side connection policies of a specific Bluetooth profile for all devices in a specific connection state and/or specific bond state.
Note:BluetoothProfileConnectionPolicy.UNKNOWN is returned in the following situations:
The profile is not in connectableProfiles.
The Bluetooth device is not paired.
The policy is not set.
Return
The map of Bluetooth profile connection policies for the Bluetooth device address.
Parameters
profile
The Bluetooth profile for which the policies needs to be retrieved.
deviceConnectionState
Optional connection state of the devices for which the policies needs to be retrieved.
deviceBondState
Optional bond state of the devices for which the policies needs to be retrieved.