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] please fix crash for android when onActivityResult called from other module but documentScanner = null #103

Open
fukemy opened this issue Jan 17, 2023 · 0 comments

Comments

@fukemy
Copy link

fukemy commented Jan 17, 2023

Hi, I am using other lib(photo editor), it's using onActivityResult to get the image, but the module onActivityResult triggered + documentScanner = null => app crashed

Please fix like this to avoid crash

private ActivityEventListener activityEventListener = new BaseActivityEventListener() {
        @Override
        public void onActivityResult(
                final Activity activity,
                final int requestCode,
                final int resultCode,
                final Intent intent) {
            // trigger callbacks (success, cancel, error)
            if (requestCode == DOCUMENT_SCAN_REQUEST) {
                if(documentScanner != null){
                    documentScanner.handleDocumentScanIntentResult(
                            new ActivityResult(resultCode, intent)
                    );
                }
            }
        }
    };
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

1 participant