Skip to content

[BUG] CameraView FlashModes "Auto" and "On" throwing CameraExceptions on some Android devices #3141

@KonstantinKellermann

Description

@KonstantinKellermann

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

We are facing some problems when using the CameraView with FlashMode set to "Auto" or "On". Whenever the flashlight turns on, the CameraView throws a CameraException after up to 10 seconds on some Android devices.

At the moment, this seems to mainly affect the Samsung Galaxy A-series, but not all models. My private phone (A54 5G) has no problems, while we know that the A53 5G and A56 5G show the described behavior.

I created a small example project on GitHub to reproduce the issue:
TestMauiCamera

Maybe we are missing something, or this could be related to specific Android or One UI versions. We are not sure how to handle this and hope you might be able to help us.

Expected Behavior

The photo should be taken without throwing any exceptions with and without using the flashlight.

Steps To Reproduce

  1. Open and run the reproduction repository on an affected device
  • Alternatively, create a simple project using CameraView with flash enabled using the latest .NET MAUI and CommunityToolkit versions
  1. Take a photo
    (The photo is not saved in the reproduction repository. It is only meant to reproduce the exception.)
  2. Use the FlashMode "On" or "Auto"
  3. On affected devices, the exception is thrown after up to 10 seconds.

Link to public reproduction project repository

https://github.com/KonstantinKellermann/TestMauiCamera/tree/main

Environment

- .NET MAUI CommunityToolkit: 14.0.1
- .NET MAUI CommunityToolkit-Camera: 6.0.0
- OS: Android 16
- .NET Version: 10.0.101
- .NET MAUI Controls: 10.0.41

Anything else?

No response

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions