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

Mobile Scanner not opening in android webview #1267

Open
AnikethFitPass opened this issue Dec 27, 2024 · 1 comment
Open

Mobile Scanner not opening in android webview #1267

AnikethFitPass opened this issue Dec 27, 2024 · 1 comment

Comments

@AnikethFitPass
Copy link

AnikethFitPass commented Dec 27, 2024

Description

The mobile_scanner plugin is not opening the camera when I run my flutter website inside an Android webview The camera scanner fails to open or initialize when called from within the WebView environment. I have also tried it with newer version of flutter - 3.24.5 and mobile_scanner - 6.0.2 but the issue is still there . The scanner works when i run it alone on web , but after integrating it on the webview it fails to open the camera . I have tried integrating in both native android webview and flutter android webview

Environment

  • Flutter (Channel stable, 3.16.5, on macOS 15.2 24C101 darwin-arm64, locale en-US)
  • mobile_scanner: 3.4.1

Steps to Reproduce

  1. Created an Android WebView application
  2. Implemented mobile_scanner plugin according to documentation
  3. Added necessary camera permissions in AndroidManifest.xml
  4. Attempted to access scanner functionality through WebView

Current Behavior

The scanner camera does not open when triggered from within the WebView.

WhatsApp Image 2024-12-27 at 12 08 20 PM

@navaronbracke
Copy link
Collaborator

You are using both an old version of Flutter and an old version of mobile_scanner.

Does this reproduce on Flutter 3.24 or 3.27 with mobile_scanner 6.0.0 ?

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