react-native-rectangle-doc-scanner 3.170.0 → 3.171.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -141,15 +141,10 @@ class CameraController(
141
141
  }
142
142
 
143
143
  try {
144
- // Set surface provider BEFORE binding to lifecycle
145
- Log.d(TAG, "[BIND] Setting surface provider to previewView...")
146
144
  Log.d(TAG, "[BIND] PreviewView: $previewView")
147
145
  Log.d(TAG, "[BIND] PreviewView.surfaceProvider: ${previewView.surfaceProvider}")
148
146
  Log.d(TAG, "[BIND] PreviewView attached to window: ${previewView.isAttachedToWindow}")
149
147
  Log.d(TAG, "[BIND] PreviewView size: ${previewView.width}x${previewView.height}")
150
- preview.setSurfaceProvider(previewView.surfaceProvider)
151
- Log.d(TAG, "[BIND] Surface provider set successfully")
152
-
153
148
  // Unbind all use cases before rebinding
154
149
  Log.d(TAG, "[BIND] Unbinding all existing use cases...")
155
150
  cameraProvider.unbindAll()
@@ -169,6 +164,14 @@ class CameraController(
169
164
  )
170
165
  Log.d(TAG, "[BIND] Bound to lifecycle successfully, camera: $camera")
171
166
 
167
+ Log.d(TAG, "[BIND] Setting surface provider to previewView...")
168
+ Log.d(TAG, "[BIND] PreviewView: $previewView")
169
+ Log.d(TAG, "[BIND] PreviewView.surfaceProvider: ${previewView.surfaceProvider}")
170
+ // Devices with the SurfaceOrderQuirk expect the preview surface to be set last.
171
+ // Apply the SurfaceProvider after binding so the preview stays on top.
172
+ preview.setSurfaceProvider(previewView.surfaceProvider)
173
+ Log.d(TAG, "[BIND] Surface provider set successfully")
174
+
172
175
  // Restore torch state if it was enabled
173
176
  if (torchEnabled) {
174
177
  Log.d(TAG, "[BIND] Restoring torch state...")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rectangle-doc-scanner",
3
- "version": "3.170.0",
3
+ "version": "3.171.0",
4
4
  "description": "Native-backed document scanner for React Native with customizable overlays.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",