Hierarchy

Properties

nativeObject: any
ios: Partial<PermissionIOSProps>
android: Partial<PermissionAndroidProps>

Methods

  • Requests permissions for both OS. If you want to get a permission which is specific to certain OS, please use their respective method instead. For Android, this will override onRequestPermissionsResult method, therefore if you want to handle another android specific permissions, please override the method again.

    Parameters

    Returns Promise<PermissionResult>

  • Creates an event emitter instance to listen for the actions

    Returns

    Call the function to remove the event

    Parameters

    • eventName: "requestPermissionsResult"
    • callback: ((e: { requestCode: number; result: boolean | boolean[] }) => void)

      Gets as any arguments as it needs

        • (e: { requestCode: number; result: boolean | boolean[] }): void
        • Parameters

          • e: { requestCode: number; result: boolean | boolean[] }
            • requestCode: number
            • result: boolean | boolean[]

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "requestPermissionsResult"
    • callback: ((e: { requestCode: number; result: boolean | boolean[] }) => void)
        • (e: { requestCode: number; result: boolean | boolean[] }): void
        • Parameters

          • e: { requestCode: number; result: boolean | boolean[] }
            • requestCode: number
            • result: boolean | boolean[]

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Removes the specified event and invokes the callback after it is removed

    Parameters

    • eventName: "requestPermissionsResult"
    • callback: ((e: { requestCode: number; result: boolean | boolean[] }) => void)
        • (e: { requestCode: number; result: boolean | boolean[] }): void
        • Parameters

          • e: { requestCode: number; result: boolean | boolean[] }
            • requestCode: number
            • result: boolean | boolean[]

          Returns void

    Returns void

  • Parameters

    • eventName: "requestPermissionsResult"
    • callback: ((e: { requestCode: number; result: boolean | boolean[] }) => void)
        • (e: { requestCode: number; result: boolean | boolean[] }): void
        • Parameters

          • e: { requestCode: number; result: boolean | boolean[] }
            • requestCode: number
            • result: boolean | boolean[]

          Returns void

    Returns void

  • Triggers the event manually.

    Parameters

    • eventName: "requestPermissionsResult"
    • e: { requestCode: number; result: boolean | boolean[] }

      Arguments that needs to be passed down

      • requestCode: number
      • result: boolean | boolean[]

    Returns void

  • Parameters

    • eventName: "requestPermissionsResult"
    • e: { requestCode: number; result: boolean | boolean[] }
      • requestCode: number
      • result: boolean | boolean[]

    Returns void

  • Creates an event emitter instance to listen for the actions

    Returns

    Call the function to remove the event

    Parameters

    • eventName: "requestPermissionsResult"
    • callback: ((e: { requestCode: number; result: boolean | boolean[] }) => void)

      Gets as any arguments as it needs

        • (e: { requestCode: number; result: boolean | boolean[] }): void
        • Parameters

          • e: { requestCode: number; result: boolean | boolean[] }
            • requestCode: number
            • result: boolean | boolean[]

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    • eventName: "requestPermissionsResult"
    • callback: ((e: { requestCode: number; result: boolean | boolean[] }) => void)
        • (e: { requestCode: number; result: boolean | boolean[] }): void
        • Parameters

          • e: { requestCode: number; result: boolean | boolean[] }
            • requestCode: number
            • result: boolean | boolean[]

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

  • Adds the listener function to the beginning of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

    Parameters

    • eventName: "requestPermissionsResult"
    • callback: ((e: { requestCode: number; result: boolean | boolean[] }) => void)
        • (e: { requestCode: number; result: boolean | boolean[] }): void
        • Parameters

          • e: { requestCode: number; result: boolean | boolean[] }
            • requestCode: number
            • result: boolean | boolean[]

          Returns void

    Returns void

  • Parameters

    • eventName: "requestPermissionsResult"
    • callback: ((e: { requestCode: number; result: boolean | boolean[] }) => void)
        • (e: { requestCode: number; result: boolean | boolean[] }): void
        • Parameters

          • e: { requestCode: number; result: boolean | boolean[] }
            • requestCode: number
            • result: boolean | boolean[]

          Returns void

    Returns void

  • Adds a one-time listener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this listener is removed, and then invoked.

    Parameters

    • eventName: "requestPermissionsResult"
    • callback: ((e: { requestCode: number; result: boolean | boolean[] }) => void)
        • (e: { requestCode: number; result: boolean | boolean[] }): void
        • Parameters

          • e: { requestCode: number; result: boolean | boolean[] }
            • requestCode: number
            • result: boolean | boolean[]

          Returns void

    Returns void

  • Parameters

    • eventName: "requestPermissionsResult"
    • callback: ((e: { requestCode: number; result: boolean | boolean[] }) => void)
        • (e: { requestCode: number; result: boolean | boolean[] }): void
        • Parameters

          • e: { requestCode: number; result: boolean | boolean[] }
            • requestCode: number
            • result: boolean | boolean[]

          Returns void

    Returns void

Generated using TypeDoc