TokenBundleRepositoryImpl

class TokenBundleRepositoryImpl<T>(registry: WearDataLayerRegistry, key: String = DEFAULT_TOKEN_BUNDLE_KEY, coroutineScope: CoroutineScope, serializer: Serializer<T>) : TokenBundleRepository<T>

Default implementation for TokenBundleRepository.

If multiple token bundles are required to be shared, specify a key in order to identify each one, otherwise the same default key will be used and only a single token bundle will be persisted.

Samples

com.google.android.horologist.auth.sample.MainActivity

Constructors

Link copied to clipboard
constructor(registry: WearDataLayerRegistry, key: String = DEFAULT_TOKEN_BUNDLE_KEY, coroutineScope: CoroutineScope, serializer: Serializer<T>)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open suspend override fun isAvailable(): Boolean

Check if this repository is available to be used on this device.

Link copied to clipboard
open suspend override fun update(tokenBundle: T)