diff --git a/android/src/main/java/com/mrousavy/camera/CameraView.kt b/android/src/main/java/com/mrousavy/camera/CameraView.kt index e666cb5185..6e8222e63b 100644 --- a/android/src/main/java/com/mrousavy/camera/CameraView.kt +++ b/android/src/main/java/com/mrousavy/camera/CameraView.kt @@ -302,6 +302,10 @@ class CameraView(context: Context, private val frameProcessorThread: ExecutorSer } override fun onDetachedFromWindow() { + coroutineScope.launch { + val cameraProvider = ProcessCameraProvider.getInstance(reactContext).await() + cameraProvider.unbindAll() + } super.onDetachedFromWindow() updateLifecycleState() }