Skip to content

Conversation

ShivamKJJW
Copy link

Issue: 3027
When camera is set to be active the side props needs to be reapplied as it is a known bug where zoom level gets resets on CameraX module after camera is set to inactive.

#3027

What

Android: Camera sideProps reflection on initialization and active state change

Changes

This PR adds a patch to re configure the side props whenver camera active state changes

Tested on

  • Redmi 12, Android 14
  • Redmi Pad Pro, Android 14
  • Samsung M53, Android 13

Related issues

Fixes #3027

Issue: 3027
When camera is set to be active the side props needs to be reapplied as it is a known bug where zoom level gets resets on CameraX module after camera is set to inactive.

mrousavy#3027
Update CameraSession+Configuration.kt
@vercel
Copy link

vercel bot commented May 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-vision-camera ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 15, 2025 11:02am

@RenaudAubert
Copy link

I confirm that the zoom bug mentionned in #3027 is fixed with this PR.
It also fixed a similar issue with exposure.

Thanks a lot @ShivamKJJW 🙏🏻

@mrousavy
Copy link
Owner

Does this only affect zoom? Isn't this a CameraX bug then?

@mrousavy
Copy link
Owner

I appreciate the PR, but I don't want to monkey-patch broken behaviour in CameraX - this will lead to an unmaintainable mess.

We should rather file a bug report in CameraX and wait for a fix there.

@ShivamKJJW
Copy link
Author

I appreciate the PR, but I don't want to monkey-patch broken behaviour in CameraX - this will lead to an unmaintainable mess.

We should rather file a bug report in CameraX and wait for a fix there.

I am not sure either that it is a bug from CameraX module itself. It seems that whenever camera state changes, the extra props needs to be set again if a custom behaviour is needed. By default camera initialises with the default zoom level of the device. Seems to be default android behaviour.

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

Successfully merging this pull request may close these issues.

🐛 Unable to set minimum zoom on first render

3 participants