You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[camera] Taking pictures is too slow on some devices #84957
Hi, I'm making a camera app with samsung s8 device and camera package.
However, there is a problem with the shooting speed being too slow on the Android device.
It takes about 0.5 to 1.5 second to shoot. (I used camera/example for testing)
The shooting speed on the Android(S8) is too slow, so even if I shoot with the flash on, the flash effect is not applied because the shooting is completed after the flash is off.
I wonder if it's a fundamental problem with the package, or it's a problem that only occurs on my S8.
Hi @nero-angela
I just tried budget videos, with a much slower process (Samsung M02s) and every pic taken has an on-time flash effect using official sample
flutter doctor -v
[✓] Flutter (Channel stable, 2.2.2, on Microsoft Windows [Version 10.0.19043.1055], locale en-US) • Flutter version 2.2.2 at C:\Users\Taha\Code\flutter_stable • Framework revision d79295af24 (10 days ago), 2021-06-11 08:56:01 -0700 • Engine revision 91c9fc8fe0 • Dart version 2.13.3[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at C:\Users\Taha\Code\SDK • Platform android-30, build-tools 30.0.3 • ANDROID_SDK_ROOT = C:\Users\Taha\Code\SDK • Java binary at: C:\Users\Taha\Code\openjdk\bin\java.exe • Java version OpenJDK Runtime Environment (build 1.8.0-262-b10) • All Android licenses accepted.[✓] Chrome - develop for the web • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.10.2) • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community • Visual Studio Community 2019 version 16.10.31410.357 • Windows 10 SDK version 10.0.19041.0[!] Android Studio (not installed) • Android Studio not found; download from https://developer.android.com/studio/index.html (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).[✓] IntelliJ IDEA Community Edition (version 2021.1) • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.1 • Flutter plugin version 57.0.5 • Dart plugin version 211.7233[✓] VS Code (version 1.57.1) • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.23.0[✓] Connected device (5 available) • SM M025F (mobile) • R9ZR205XX0A • android-arm • Android 11 (API 30) • sdk gphone x86 (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19043.1055] • Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.114 • Edge (web) • edge • web-javascript • Microsoft Edge 91.0.864.48! Doctor found issues in 1 category.
Can you please share Android version you're running? Are you using stock firmware or custom rom?
Thank you
@camsim99
I've taken several tens of photos of the same scene and on average it took 1753ms with a fix from #84957 (comment) and 358 without it.
Test code from #134300 (comment)
camera: 0.10.5+2camera_android_camerax: 0.6.1+1
Reacted by Camille Simon, Peter Aleksander Bizjak and jakobhec
I'm experiencing the same issue on a Samsung Galaxy A50s running Android 11. Taking a picture is extremely slow, sometimes taking up to 4-5 seconds. We recently upgraded the camera package from version 0.10.0+4 to 0.11.0+2, which introduced the switch from camera_android to camera_android_camerax. Additionally, we updated Flutter from version 3.13.1 to 3.24.0. I've already implemented the suggested fix mentioned here, but the issue persists. Could anyone help resolve this or at least explain why CameraX is causing such delays in capturing images? I appreciate any assistance.
Activity
TahaTesser commentedon Jun 21, 2021
Hi @nero-angela
I just tried budget videos, with a much slower process (Samsung M02s) and every pic taken has an on-time flash effect using official sample
flutter doctor -v
Can you please share Android version you're running? Are you using stock firmware or custom rom?
Thank you
nero-angela commentedon Jun 22, 2021
Hi @TahaTesser
My android version is Android 9 (API 28) and I am using the S8 after factory reset.
flutter doctor -v
flash_test.mp4
[-][camera] Taking pictures is too slow on Android.[/-][+][camera] Taking pictures is too slow on Galaxy S8[/+]SunlightBro commentedon Jun 25, 2021
Also reproducible on:
(This is currently only my own device ... I will update this list, when I can go back to the office, and have more real test devices available ...)
flutter doctor -v
55 remaining items
delfme commentedon Oct 21, 2023
Thx @Tienisto, just checked the fix on my xiaomi mi lite 5g and it works 👍
SpirikleOfficial commentedon Dec 8, 2023
camsim99 commentedon Mar 27, 2024
This issue should be fixed in the CameraX implementation of the camera plugin, so please try it out!
If you find a similar issue with that implementation (or any other issues), please feel free to file a separate issue.
vodemn commentedon Apr 5, 2024
@camsim99
I've taken several tens of photos of the same scene and on average it took 1753ms with a fix from #84957 (comment) and 358 without it.
Test code from #134300 (comment)
Buenaventura-Celine commentedon Sep 6, 2024
I'm experiencing the same issue on a Samsung Galaxy A50s running Android 11. Taking a picture is extremely slow, sometimes taking up to 4-5 seconds. We recently upgraded the camera package from version
0.10.0+4to0.11.0+2, which introduced the switch from camera_android to camera_android_camerax. Additionally, we updated Flutter from version3.13.1to3.24.0. I've already implemented the suggested fix mentioned here, but the issue persists. Could anyone help resolve this or at least explain why CameraX is causing such delays in capturing images? I appreciate any assistance.victkk commentedon Oct 2, 2024
@camsim99
ugprading from camera 10 to 11 reduce the time from 500ms to 300ms. But I'm looking for something like 50ms, is this possible?
abhitheawesomecoder commentedon Dec 16, 2024
clhey commentedon Jun 15, 2025
filio-corp commentedon Dec 8, 2025
[camera] Fix Android autofocus state reading (flutter#5025)
[camera] Fix Android autofocus state reading (flutter#5025)