Skip to content
This repository was archived by the owner on Jul 2, 2021. It is now read-only.
This repository was archived by the owner on Jul 2, 2021. It is now read-only.

MultiplePermissionsListener REQUEST_ONGOING #105

Closed
@andro-jedi

Description

@andro-jedi

Expected behaviour

Call onPermissionsChecked with already granted permissions

Actual behaviour

when I ask for permissions it call onError(DexterError error) with REQUEST_ONGOING error
Activity was closed and opened several times using startActivityForResult setResult(OK) or CANCEL before this happened.

Steps to reproduce

 Dexter.withActivity(getActivity())
                .withPermissions(
                        Manifest.permission.CAMERA,
                        Manifest.permission.READ_EXTERNAL_STORAGE
                ).withListener(new MultiplePermissionsListener() {
            @Override
            public void onPermissionsChecked(MultiplePermissionsReport report) {
                if (report.areAllPermissionsGranted()) {
                    openCamera();
                } else {
                    requestMultiplePermissions();
                 }
                   }

            @Override
            public void onPermissionRationaleShouldBeShown(List<PermissionRequest> permissions, PermissionToken token) {
                token.continuePermissionRequest();
            }
        }).withErrorListener(new PermissionRequestErrorListener() {
            @Override
            public void onError(DexterError error) {
                int y = 0; 
            }
        }).check();

Version of the library

3.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions