fake-permissions
    Preparing search index...

    Interface AccessDialog

    A virtual permission access dialog.

    interface AccessDialog {
        allow: () => void;
        deny: () => void;
        dismiss: () => void;
        remember: (shouldRemember: boolean) => void;
    }
    Index

    Properties

    allow: () => void

    Allow access to the requested permission.

    Depending on whether the dialog choice should be remembered, this will change the permission's access status:

    • If remembered, the permission's access status will change to "GRANTED".
    • If not remembered, the permission's access status will change to "ALLOWED".

    An Error if the dialog is already closed.

    deny: () => void

    Deny access to the requested permission.

    Depending on whether the dialog choice should be remembered, this will change the permission's access status:

    • If remembered, the permission's access status will change to "BLOCKED".
    • If not remembered, the permission's access status will change to "DENIED".

    An Error if the dialog is already closed.

    dismiss: () => void

    Dismiss the dialog without making a choice.

    Dismissing the dialog will have no effect on the permission's access status, until the number of dismissals reaches PermissionStoreParameters.dismissDenyThreshold, at which point the permission's access status will change to "BLOCKED_AUTOMATICALLY".

    An Error if the dialog is already closed.

    remember: (shouldRemember: boolean) => void

    Set whether the dialog choice should be remembered.

    Actual persistence is out of scope for this library. But this does affect how the permission's PermissionAccessStatus is changed by the dialog choice:

    • If shouldRemember is true and access is allowed, the permission's access status will change to "GRANTED".
    • If shouldRemember is true and access is denied, the permission's access status will change to "BLOCKED".
    • If shouldRemember is false and access is allowed, the permission's access status will change to "ALLOWED".
    • If shouldRemember is false and access is denied, the permission's access status will change to "DENIED".

    Type declaration

      • (shouldRemember: boolean): void
      • Parameters

        • shouldRemember: boolean

          Whether the choice should be remembered.

        Returns void

    An Error if the dialog is already closed.

    PermissionStoreParameters.dialogDefaultRemember which sets the default behavior for all dialogs.