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.

开放

#271 创建于 2020年10月26日

 (1 条评论) (0 个反应) (0 位负责人)Java (682 个派生)batch import
bughelp wanted

仓库指标

星标
 (5,224 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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

贡献者指南