IMediaExtensionObserver

Extension event callback interface class.

onErrorWithContext

Occurs when the extension runs incorrectly.

void onErrorWithContext(ExtensionContext extContext, int error, String message){};

In case of extension enabling failure or runtime errors, the extension triggers this callback and reports the error code along with the reasons.

Parameters

extContext
The context information of the extension, see ExtensionContext.
error
Error code. For details, see the extension documentation provided by the extension provider.
message
Reason. For details, see the extension documentation provided by the extension provider.

onEventWithContext

The event callback of the extension.

void onEventWithContext(ExtensionContext extContext, String key, String value){};

To listen for events while the extension is running, you need to register this callback.

Parameters

extContext
The context information of the extension, see ExtensionContext.
key
The key of the extension.
value
The value of the extension key.

onStartedWithContext

Occurrs when the extension is enabled.

void onStartedWithContext(ExtensionContext extContext){};

The callback is triggered after the extension is successfully enabled.

Parameters

extContext
The context information of the extension, see ExtensionContext.

onStoppedWithContext

Occurs when the extension is disabled.

void onStoppedWithContext(ExtensionContext extContext){};

The callback is triggered after the extension is successfully disabled.

Parameters

extContext
The context information of the extension, see ExtensionContext.