class PlatformDataKey<T : DynamicBuilders.DynamicType?> : DynamicDataKey


Represent a DynamicDataKey that references real-time data from the platform.

The [namespace, key] tuple creates the actual reference, so that a single key can refer to two different sources in two different namespaces.

The namespace must not be empty. Additionally, the "protolayout" namespace (and its lowercase and uppercase variations) are reserved for the default platform data sources and should not be used for any custom OEM data source. To make sure namespaces are unique, any custom namespace is expected to follow Java style naming com.company.foo.

Parameters
<T : DynamicBuilders.DynamicType?>

The data type of the dynamic values that this key is bound to.

Summary

Public constructors

PlatformDataKey(namespace: String, key: String)

Create a PlatformDataKey with the specified key in the given namespace.

Inherited functions

From androidx.wear.protolayout.expression.DynamicDataKey
Boolean
equals(other: Any?)
String

Gets the key that references the dynamic data source

String

Gets the namespace of the key for the dynamic data source.

Int
String

Public constructors

PlatformDataKey

Added in 1.0.0
PlatformDataKey(namespace: String, key: String)

Create a PlatformDataKey with the specified key in the given namespace.

Parameters
namespace: String

The namespace of the key for the platform data source.

key: String

The key that references the platform data source.