Class PermissionStatusEvent


public class PermissionStatusEvent extends ClientEvent<PermissionsListener>
Event fired when a permission status is retrieved or changes.
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • PermissionStatusEvent

      public PermissionStatusEvent(String permissionName, String state)
      Constructs a PermissionStatusEvent.
      Parameters:
      permissionName - The name of the permission.
      state - The permission state: "granted", "denied", or "prompt".
  • Method Details

    • getPermissionName

      public String getPermissionName()
      Returns the name of the permission.
      Returns:
      The permission name.
    • getState

      public String getState()
      Returns the permission state.
      Returns:
      "granted", "denied", or "prompt".
    • isGranted

      public boolean isGranted()
      Returns whether the permission is granted.
      Returns:
      True if granted.
    • isDenied

      public boolean isDenied()
      Returns whether the permission is denied.
      Returns:
      True if denied.
    • isPrompt

      public boolean isPrompt()
      Returns whether the user will be prompted.

      This state indicates the permission hasn't been granted or denied yet, and the user will be prompted when the feature is used.

      Returns:
      True if the user will be prompted.
    • dispatchTo

      public void dispatchTo(PermissionsListener listener)
      Description copied from class: Event
      Dispatches this event to the specified listener.

      Subclasses implement this method to call the appropriate handler method on the listener interface.

      Specified by:
      dispatchTo in class Event<PermissionsListener>
      Parameters:
      listener - the listener to dispatch this event to
    • toString

      public String toString()
      Overrides:
      toString in class Object