interface PlatformDataProvider


This interface is used by platform data providers to yield dynamic data for their supported data keys.

It's up to the implementations to check if the expression provider has the required permission before sending data with onData. If a required permission is not granted or is revoked they should stop sending more data and call onInvalidated instead.

Summary

Public functions

Unit

Clears the receiver from the provider.

Unit
setReceiver(executor: Executor, receiver: PlatformDataReceiver)

Sets the receiver for receiving the platform data from this provider.

Public functions

clearReceiver

Added in 1.0.0
fun clearReceiver(): Unit

Clears the receiver from the provider.

setReceiver

Added in 1.0.0
fun setReceiver(executor: Executor, receiver: PlatformDataReceiver): Unit

Sets the receiver for receiving the platform data from this provider.

Calling this method while there is already a receiver set, should replace the previous receiver.

The implementation should periodically send the dynamic data values for the set of s specified when registering this PlatformDataProvider in addPlatformDataProvider

Parameters
receiver: PlatformDataReceiver

The PlatformDataReceiver to receive the new dynamic values or to be notified that the current data has been invalidated for the registered keys.

executor: Executor

The executor to run the onData or onInvalidated on.