Karumi / Dexter

Android library that simplifies the process of requesting permissions at runtime.
http://karumi.com
Apache License 2.0
5.23k stars 671 forks source link

Camera permissions not click allow and deny direct callback #158

Open star-andy opened 7 years ago

star-andy commented 7 years ago

Please forgive my English is not good

Expected behaviour

Camera access normal callback

Actual behaviour

Camera permissions not click allow and deny direct callback

Steps to reproduce

 mServiceScanView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Dexter.withActivity(getActivity())
                        .withPermission(Manifest.permission.CAMERA)
                        .withListener(ServiceLazyFragment.this)
                        .check();
            }
        });

Click on the screen after permission to apply for dialog,At the same time direct callback,I don't have a click allow and deny

 @Override
    public void onPermissionGranted(PermissionGrantedResponse response) {
        KLog.e("允许相机权限");
    }

E/ServiceLazyFragment.java: [ (ServiceLazyFragment.java:179)#OnPermissionGranted ] 允许相机权限 Mobile version: image

Version of the library

com.karumi:dexter:4.1.0

djamb commented 7 years ago

I think that is a bug. You changed your camera permission manually. Unistall your app and reinstall.

star-andy commented 7 years ago

Uninstall or reinstall is still the same problem ,I don't have to manually modify permissions, is through the code to access

flipper83 commented 7 years ago

@qinyang1018 what compilationversion are you using in you build.gradle?

star-andy commented 7 years ago

@flipper83 I'm sorry To reply until now image image this is my build.gradle

vancelopes commented 6 years ago

Please be sure that you have your Camera permission in your AndroidManifest.xml. Had this same behaviour times ago.

star-andy commented 6 years ago

it have on AndroidManifest.xml

DovSnier commented 6 years ago

Is this problem solved ?