WearDataLayerRegistry
class WearDataLayerRegistry(val dataClient: DataClient, val nodeClient: NodeClient, val messageClient: MessageClient, val capabilityClient: CapabilityClient, coroutineScope: CoroutineScope)
Implementation of Androidx Datastore for Proto and Preferences on top of the Wearable DataClient.
See https://developer.android.com/topic/libraries/architecture/datastore for DataStore features.
Constructors
Properties
Functions
Link copied to clipboard
Link copied to clipboard
fun <T> protoDataStore(path: String, coroutineScope: CoroutineScope, serializer: Serializer<T>, started: SharingStarted = SharingStarted.WhileSubscribed(5000)): DataStore<T>
Returns a local Proto DataStore for the given Proto structure.
Link copied to clipboard
inline fun <T : Any> WearDataLayerRegistry.protoDataStore(coroutineScope: CoroutineScope): DataStore<T>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <T : Any> registerProtoDataListener(path: String, listener: ProtoDataListener<T>, serializer: Serializer<T>)
Link copied to clipboard
inline fun <T : Any> WearDataLayerRegistry.registerProtoDataListener(listener: ProtoDataListener<T>)
Link copied to clipboard