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

fix: Unbind Camera in onDetachedFromWindow and fix minSdkVersion #1955

Merged
merged 4 commits into from
Oct 16, 2023

Conversation

Skizu
Copy link

@Skizu Skizu commented Oct 9, 2023

What

This PR fixes camera device and session resource cleanup when unmounted for Android devices. Additionally this build resolves a number of build issues relating to reading project configuration.

Changes

  • Adds camera provider unbinding in onDetachedFromWindow.
  • Fixes minSdkVersion in android/build.gradle to read from root project.
  • Fixes FOR_HERMES in android/build.gradle to read from root project.
  • Fixes abiFilters in android/build.gradle to read from gradle.properties.

Tested on

Samsung S10-S22, Samsung XCover Pro V3-6, Pixel 3a-6

Related issues

@vercel
Copy link

vercel bot commented Oct 9, 2023

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 Oct 9, 2023 1:36pm

@mrousavy
Copy link
Owner

mrousavy commented Oct 9, 2023

good point!

@mrousavy
Copy link
Owner

Hey, thanks for your PR - unfortunately the build failed.

> Cannot invoke method toInteger() on null object

Can you fix that? Otherwise we're good to go!

Screenshot 2023-10-14 at 12 23 22

@mrousavy mrousavy changed the title fix: camera session is bound and idle on unmount [Android] fix: Unbind Camera in onDetachedFromWindow and fix minSdkVersion Oct 14, 2023
@mrousavy
Copy link
Owner

okay whatever I'll do it myself.

@mrousavy mrousavy merged commit aa3fe77 into mrousavy:v2 Oct 16, 2023
3 of 5 checks passed
mrousavy pushed a commit that referenced this pull request Feb 8, 2024
j-piasecki pushed a commit to j-piasecki/react-native-vision-camera that referenced this pull request Feb 12, 2024
…usavy#1955)

* fix: camera session is bound and idle on unmount

* fix: abiFilters do not read from gradle.properties

* fix: minSdkVersion does not read from root project

* fix: FOR_HERMES null is truthy
j-piasecki pushed a commit to j-piasecki/react-native-vision-camera that referenced this pull request Feb 12, 2024
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.

None yet

2 participants