googlesamples / easypermissions

Simplify Android M system permissions
https://firebaseopensource.com/projects/googlesamples/easypermissions/
Apache License 2.0
9.86k stars 1.46k forks source link

Empty Rationale Dialog with cancel and ok button. #294

Closed hemantparmar23 closed 4 years ago

hemantparmar23 commented 4 years ago

Basic Information

Device type: Xiaomi Redmi Note 7 Pro OS version: 9.0____ EasyPermissions version: 3.0.0(androidX)

Describe the problem

While trying to integrate easypermissions into my app. The permissions work fine the first time but when rationale dialog is supposed to be shown (the second time I request permission after the first time it was denied) I get a empty rationale dialog even though I am supplying proper text to it. What happened? What did you expect to happen? The rationale dialog was missing the text supplied. The text should have been there.

Code and logs

@AfterPermissionGranted(RC_CAMERA_PERM)
    public void cameraTask() {
        if (hasCameraPermission()) {
            // Have permission, do the thing!
            Toast.makeText(this, "TODO: Camera things", Toast.LENGTH_LONG).show();
        } else {
            // Ask for one permission
            EasyPermissions.requestPermissions(
                    this,
                    getString(R.string.permission_storage_rationale),
                    RC_CAMERA_PERM,
                    Manifest.permission.CAMERA);
        }
    }

test

samtstern commented 4 years ago

This looks like it might be a theme issue? The buttons in the picture have a grey background and white text. If the text in the dialog is white it would be invisible.

Can you try changing your app theme temporarily to a darker text color and see if you can see the text?

On Thu, Dec 12, 2019, 7:56 AM hemantparmar23 notifications@github.com wrote:

Basic Information

Device type: Xiaomi Redmi Note 7 Pro OS version: 9.0____ EasyPermissions version: 3.0.0(androidX) Describe the problem

While trying to integrate easypermissions into my app. The permissions work fine the first time but when rationale dialog is supposed to be shown (the second time I request permission after the first time it was denied) I get a empty rationale dialog even though I am supplying proper text to it. What happened? What did you expect to happen? The rationale dialog was missing the text supplied. The text should have been there. Code and logs

@AfterPermissionGranted(RC_CAMERA_PERM) public void cameraTask() { if (hasCameraPermission()) { // Have permission, do the thing! Toast.makeText(this, "TODO: Camera things", Toast.LENGTH_LONG).show(); } else { // Ask for one permission EasyPermissions.requestPermissions( this, getString(R.string.permission_storage_rationale), RC_CAMERA_PERM, Manifest.permission.CAMERA); } }

[image: test] https://user-images.githubusercontent.com/1955738/70727642-fe8efa80-1d25-11ea-95e4-477d9dd60236.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/googlesamples/easypermissions/issues/294?email_source=notifications&email_token=ACATB2SJOXCB4Y7DM76RCRLQYJNKNA5CNFSM4J2AWZVKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IAC6XBA, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACATB2W4QYDQL7SQQOMKJLLQYJNKNANCNFSM4J2AWZVA .

hemantparmar23 commented 4 years ago

Thanks It was indeed a styling issue on my part.