FastPairClient

public interfaceFastPairClientimplementsHasApiKey<Api.ApiOptions.NoOptions>

Interface to Fast Pair APIs. It includes Smart Audio Source Switching (SASS) APIs through which the client can implementAudio 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 specificAudioUsage.

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:

Otherwise returns FastPairStatusCodes.FAILED_PERMISSION_DENIEDerror code. For other status codes, checkFastPairStatusCodes.

public abstract Task<Boolean> triggerSassForUsage(int audioUsage)

Triggers SASS with a specificAudioUsage. Returns true if the trigger is accepted, and the connection established successfully, otherwise false.

Client must declare the following permissions depending on platform:

Otherwise returns FastPairStatusCodes.FAILED_PERMISSION_DENIEDerror code. For other status codes, checkFastPairStatusCodes.