DataTypeImpl

abstract class DataTypeImpl(val extension: String, val typeId: String)

Base class for implementation of DataType.

Use for streaming data and custom data type views.

If RemoteViews are being updated in startView, DataType.graphical should be true.

See also

Samples

dataTypeImplUsagevisualDataTypeImplUsage

Constructors

Link copied to clipboard
constructor(extension: String, typeId: String)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun startStream(emitter: Emitter<StreamState>)

Start emitting StreamState events for this data type. This is required for use as a standard numeric view or if any data from this data type needs to be consumed by the custom view or another data type.

Link copied to clipboard
open fun startView(context: Context, config: ViewConfig, emitter: ViewEmitter)

Start emitting ViewEvent events and RemoteViews for this data type's custom view.