getProfileConnectionPolicy

abstract suspend fun getProfileConnectionPolicy(deviceAddress: BluetoothDeviceAddress, profile: BluetoothDeviceProfile): BluetoothProfileConnectionPolicy

Retrieves the platform side connection policy of a specific Bluetooth profile for a specific Bluetooth device.

Note:BluetoothProfileConnectionPolicy.UNKNOWN is returned in the following situations:

Return

The Bluetooth profile connection policy.

Parameters

deviceAddress

The address of the device.

profile

The Bluetooth profile for which the policy needs to be retrieved.