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

Dexter doesn't notify when the app goes in background with permission dialog open and when returning doing tap in the app icon, the permission dialog is close. #271

Open
aljosta opened this issue Oct 26, 2020 · 1 comment

Comments

@aljosta
Copy link

aljosta commented Oct 26, 2020

Expected behaviour

Notify on any callback or listener of dexter when the permissions array and the grant result array are empty on method onRequestPermissionResult.

Actual behaviour

It is not notifying these case in any callback or listener of dexter.

Steps to reproduce

It's happen when the launchMode=standard for the main activity in the app manifest, when the permission dialog is open, then I send to background my app , then return to the app doing tap in the icon, then the permission dialog is already close but dexter never notify this case. When I implement de requestPermission and onRequetPermissionResult directly in my app, this case is notified.

Version of the library

5.0.0, also tested with 6.2.1

The following is the dexter implementation in my app.

Dexter.withActivity(activity)
                .withPermissions(arrayPermisos)
                .withListener(new MultiplePermissionsListener() {
                    @Override
                    public void onPermissionsChecked(MultiplePermissionsReport report) {
                    }
                    @Override
                    public void onPermissionRationaleShouldBeShown(List<PermissionRequest> permissions, PermissionToken token) {
                        token.continuePermissionRequest();
                    }
                })
                .withErrorListener(new PermissionRequestErrorListener() {
                    @Override
                    public void onError(DexterError error) {
                        Log.e("Dexter", "There was an error: " + error.toString());
                    }
                })
                .onSameThread().check();
@aljosta aljosta changed the title Dexter doesn't notify when the permissions array and the grant result array are empty on method onRequestPermissionResult. Dexter doesn't notify when the app goes in background with permission dialog open and when returning doing tap in the app icon, the permission dialog is close. Oct 27, 2020
@pedrovgs
Copy link
Contributor

pedrovgs commented Nov 9, 2020

Hi @aljosta I tried to reproduce the error you mention configuring the sample project to use the launch mode you mention and I couldn't. Could you please provide a reproducible sample? Thank you in advance!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants