Where the Plugin UI Renders
In Plugin Principles, we described the plugin event chain. After a button is tapped, the event is sent to PluginHost: After receiving the press event, PluginHost selects the target plugin UI by plugin identifier and renders it into its own container view. React Native UIs are described in JS/TS, but they must be rendered by a native container view on Android. A typical approach is to useReactRootView as the root container, which loads JS/TS and renders to the screen.
PluginHost also maintains a ReactRootView (or an equivalent container). All plugin UIs are mounted into this container; PluginHost uses the plugin identifier in the event to decide which plugin App entry to render.
Button Event Listener
Plugins can register multiple buttons. To distinguish “which button was pressed”, listen for button events and readid from the event.
registerButtonListener provides an event when the button is pressed. Common fields:
id to each button, and dispatch by id in the callback (e.g., switch (event.id)).