Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: permissions is already running #1371

Open
1 of 3 tasks
gghh0408 opened this issue Aug 26, 2024 · 1 comment
Open
1 of 3 tasks

[Bug]: permissions is already running #1371

gghh0408 opened this issue Aug 26, 2024 · 1 comment

Comments

@gghh0408
Copy link

gghh0408 commented Aug 26, 2024

Please select affected platform(s)

  • Android
  • iOS
  • Windows

Steps to reproduce

1.start to get the permission like camera.
2.cancle the permission dialog by gesture.(onrequestpermissionResult will not callback on this moment)
3.start to get the camera permission again.
4.bug happened.

Expected results

I tried to fix this, but I'm not sure if it will affect the others。

My modification plan like it↓:

private boolean isAbleToClearCount = false;

    @PermissionConstants.PermissionStatus
    private int determinePermissionStatus(final @PermissionConstants.PermissionGroup int permission) {
        if (isAbleToClearCount) {
            isAbleToClearCount = false;
            pendingRequestCount = 0;
        }

line 435:
       if (permissionsToRequest.size() > 0) {
            isAbleToClearCount = true;
            final String[] requestPermissions = permissionsToRequest.toArray(new String[0]);
            ActivityCompat.requestPermissions(
                    activity,
                    requestPermissions,
                    PermissionConstants.PERMISSION_CODE);
        }

Looking forward to your reply。

@zzf0805
Copy link

zzf0805 commented Oct 25, 2024

same

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

No branches or pull requests

2 participants