Karumi/Dexter

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.

Open

#271 opened on Oct 26, 2020

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Java (5,224 stars) (682 forks)batch import
bughelp wanted

Description

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();

Contributor guide

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. · Karumi/Dexter#271 | Good First Issue