Interface to Fast Pair APIs. It includes Smart Audio Source Switching (SASS) APIs through which the client can implement Audio Switch functionalities.
Public Method Summary
abstract Task<Boolean> |
isSassDeviceAvailable(int audioUsage)
Queries if any SASS-supported Bluetooth device is available for a specific
AudioUsage
or not.
|
abstract Task<Boolean> |
triggerSassForUsage(int audioUsage)
Triggers SASS with a specific
AudioUsage .
|
Public Methods
public abstract Task<Boolean> isSassDeviceAvailable (int audioUsage)
Queries if any SASS-supported Bluetooth device is available for a specific
AudioUsage
or not.
Client must declare the following permissions depending on platform:
Manifest.permission.ACCESS_FINE_LOCATION
(Deprecated from Android S)Manifest.permission.BLUETOOTH_SCAN
(Required for devices running S+)
Otherwise returns
FastPairStatusCodes.FAILED_PERMISSION_DENIED
error code. For other status
codes, check FastPairStatusCodes
.
public abstract Task<Boolean> triggerSassForUsage (int audioUsage)
Triggers SASS with a specific AudioUsage
.
Returns true if the trigger is accepted, and the connection established successfully,
otherwise false.
Client must declare the following permissions depending on platform:
Manifest.permission.BLUETOOTH
(Deprecated from Android S)Manifest.permission.ACCESS_FINE_LOCATION
(Deprecated from Android S)Manifest.permission.BLUETOOTH_SCAN
(Required for devices running S+)Manifest.permission.BLUETOOTH_CONNECT
(Required for devices running S+)
Otherwise returns
FastPairStatusCodes.FAILED_PERMISSION_DENIED
error code. For other status
codes, check FastPairStatusCodes
.