Class DialogsApi


  • public final class DialogsApi
    extends Object
    Behaviour pertaining to native dialogs.
    • Method Detail

      • newDialogs

        public Dialogs newDialogs​(DialogType... dialogTypes)
        Create a new dialogs callback component.
        Parameters:
        dialogTypes - types of dialogs to enable, passing no types or null will enable all dialogs
        Returns:
        dialogs callback component
      • enable

        public void enable​(Dialogs dialogs)
        Enable native dialog callbacks.
        Parameters:
        dialogs - dialogs callback component
      • disable

        public void disable()
        Disable native dialog callbacks.
      • enable

        public void enable​(Dialogs dialogs,
                           Long userData)
        Enable native dialog callbacks, with user data.
        Parameters:
        dialogs - dialogs callback component
        userData - user data associated with the dialog
      • disable

        public void disable​(Long userData)
        Disable native dialog callbacks, with user data.
        Parameters:
        userData - user data associated with the dialog
      • postLogin

        public boolean postLogin​(DialogId id,
                                 String username,
                                 String password,
                                 boolean storeCredentials)
        Post credentials to a native login dialog.
        Parameters:
        id - identifier of the dialog to post to
        username - username credential
        password - password credential
        storeCredentials - true if the user wants to store the credential; false otherwise
        Returns:
        true if successful; false if error
      • postAction

        public boolean postAction​(DialogId id,
                                  int action)
        Post (select) an action to a native question dialog.
        Parameters:
        id - identifier of the dialog to post to
        action - action to post
        Returns:
        true if successful; false if error
      • dismiss

        public boolean dismiss​(DialogId id)
        Dismiss a native dialog.
        Parameters:
        id - identifier of the dialog to dismiss
        Returns:
        true if successful; false if error