Class UnbluCallUiComponentActionEvent

java.lang.Object
com.unblu.sdk.core.ui.UnbluCallUiComponentActionEvent

public class UnbluCallUiComponentActionEvent extends Object
Event describing a lifecycle change of the call UI component. The SDK emits this event whenever the web app signals that the native call UI component is being created or destroyed. Once your handling is finished, invoke complete() to let the SDK respond back to the web view. Until complete() is called, the JavaScript-side call remains pending. Threading: Call complete() on the main thread to ensure WebView interactions occur on the UI thread.
  • Constructor Details

    • UnbluCallUiComponentActionEvent

      public UnbluCallUiComponentActionEvent(@NonNull UnbluCallUiComponentAction action, @NonNull Runnable completion)
      Creates a new event instance.
      Parameters:
      action - The lifecycle action (CREATING or DESTROYING).
      completion - Runnable to call when native handling is complete. Should be invoked on the main thread.
  • Method Details

    • getAction

      @NonNull public UnbluCallUiComponentAction getAction()
    • complete

      public void complete()
      Signals that your handling of this event has finished. The SDK responds back to the web view and continues the flow. Call exactly once on the main (UI) thread.