Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface IEventEmitter

interface IEventEmitter
Extends com.amazon.apmf.IStandard Emit events to the React Native JavaScript layer.

Methods

emit()

void emit(com.amazon.kepler.uitoolkit.view.IView* view, string name)
Function to emit event. The function emits the event asynchronously.

Parameters

view
com.amazon.kepler.uitoolkit.view.IView* — Required View instance on which to emit the event.
name
string — Required Name of the custom event to emit.

Throws

  • InvalidKeplerScriptViewError — The provided view root node, must be a valid root node (i.e., one that was previously created from makeView).

emitWithPayload()

void emitWithPayload(com.amazon.kepler.uitoolkit.view.IView* view, string name, IPayloadDelegate* payloadDelegate)
Function to emit event with payload. The function emits the event asynchronously.

Parameters

view
com.amazon.kepler.uitoolkit.view.IView* — Required View instance on which to emit the event.
name
string — Required Name of the custom event to emit.
payloadDelegate
IPayloadDelegate* — Required An instance of payloadDelegate.

Throws

  • InvalidKeplerScriptViewError — The provided view root node, must be a valid root node (i.e., one that was previously created from makeView).

emitUnique()

void emitUnique(com.amazon.kepler.uitoolkit.view.IView* view, string name)
Function to emit unique events, if there is already an event in the eventQueue with the given type and target then that event is not emitted, inshort uniqueness is defined by two properties “Type” which is the event name and “event target” which is the corresponding view. The function emits the event asynchronously.

Parameters

view
com.amazon.kepler.uitoolkit.view.IView* — Required View instance on which to emit the event.
name
string — Required Name of the custom event to emit.

Throws

  • InvalidKeplerScriptViewError — The provided view root node, must be a valid root node (i.e., one that was previously created from makeView).

emitUniqueWithPayload()

void emitUniqueWithPayload(com.amazon.kepler.uitoolkit.view.IView* view, string name, IPayloadDelegate* payloadDelegate)
Function to emit unique events with payload, if there is already an event in the eventQueue with the given type and event target then that event is not emitted, inshort uniqueness is defined by two properties “Type” which is the event name and “event target” which is the corresponding view. The function emits the event asynchronously.

Parameters

view
com.amazon.kepler.uitoolkit.view.IView* — Required View instance on which to emit the event.
name
string — Required Name of the custom event to emit.
payloadDelegate
IPayloadDelegate* — Required An instance of payloadDelegate.

Throws

  • InvalidKeplerScriptViewError — The provided view root node, must be a valid root node (i.e., one that was previously created from makeView).

Last modified on October 29, 2026