-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work liste: OS-version specificAffects only some versions of the relevant operating systemAffects only some versions of the relevant operating systeme: device-specificOnly manifests on certain devicesOnly manifests on certain devicesp: cameraThe camera pluginThe camera pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
Error
CameraException(cameraAccess, CAMERA_ERROR (3): submitRequestList:267: Camera 1: Got error Invalid argument (-22) after trying to submit capture request)
Getting this error when taking picture with both front and rear camera on Huawei Mate 10 Lite.
I was hoping that Camera 0.9.0 would have this fix included.
I've had to change this (android/src/main/java/io/flutter/plugins/camera/Camera.java)
captureSession.stopRepeating();
captureSession.abortCaptures();
Log.i(TAG, "sending capture request");
to this
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.O) {
captureSession.stopRepeating();
} else {
captureSession.stopRepeating();
captureSession.abortCaptures();
}
For anyone having facing this problem I've pushed changes to a forked (camera 0.9.1) repo
camera:
git:
url: https://github.com/carman247/plugins
path: packages/camera/camera
ref: android-camera-access-fix
Device info
Huawei Mate 10 Lite
• Model RNE-L21
• Build number RNE-L21 8.0.0.320(C432)
• EMUI version 8.0.0
• Android version 8.0.0
Flutter doctor
[✓] Flutter (Channel stable, 2.2.3, on macOS 11.2.1 20D75 darwin-x64, locale en-GB)
• Flutter version 2.2.3 at /Users/chris/Developer/flutter
• Framework revision f4abaa0735 (8 weeks ago), 2021-07-01 12:46:11 -0700
• Engine revision 241c87ad80
• Dart version 2.13.4
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/chris/Library/Android/sdk
• Platform android-30, build-tools 29.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.0
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] VS Code (version 1.59.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.25.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work liste: OS-version specificAffects only some versions of the relevant operating systemAffects only some versions of the relevant operating systeme: device-specificOnly manifests on certain devicesOnly manifests on certain devicesp: cameraThe camera pluginThe camera pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version