DataLayerAppHelper

abstract class DataLayerAppHelper(context: Context, registry: WearDataLayerRegistry)

Base class on which of the Wear and Phone DataLayerAppHelpers are build.

Provides utility functions for determining installation status and means to install and launch apps as part of the user's journey.

Constructors

Link copied to clipboard
constructor(context: Context, registry: WearDataLayerRegistry)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val connectedAndInstalledNodes: Flow<Set<Node>>

Creates a flow to keep the client updated with the set of connected devices with the app installed.

Functions

Link copied to clipboard

Provides a list of connected nodes and the installation status of the app on these nodes.

Link copied to clipboard
abstract suspend fun installOnNode(nodeId: String): <Error class: unknown class>

Launches to the appropriate store on the specified node to allow installation of the app.

Link copied to clipboard
suspend fun isAvailable(): Boolean

Check whether the data layer is available before use to avoid crashes.

Link copied to clipboard
abstract suspend fun startCompanion(nodeId: String): <Error class: unknown class>

Starts the companion that relates to the specified node. This will start on the phone, irrespective of whether the specified node is a phone or a watch.

Link copied to clipboard
suspend fun startRemoteActivity(nodeId: String, config: <Error class: unknown class>): <Error class: unknown class>

Launch an activity, which belongs to the same app (same package name), on the specified node.

Link copied to clipboard
suspend fun startRemoteOwnApp(nodeId: String): <Error class: unknown class>

Launch own app on the specified node.