FastPairClient

public interface FastPairClient implements HasApiKey<Api.ApiOptions.NoOptions>

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:

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:

Otherwise returns FastPairStatusCodes.FAILED_PERMISSION_DENIED error code. For other status codes, check FastPairStatusCodes.