react-native-rectangle-doc-scanner 3.179.0 → 3.180.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.
@@ -146,6 +146,12 @@ class CameraController(
146
146
  Log.d(TAG, "[BIND] PreviewView attached to window: ${previewView.isAttachedToWindow}")
147
147
  Log.d(TAG, "[BIND] PreviewView size: ${previewView.width}x${previewView.height}")
148
148
  Log.d(TAG, "[BIND] PreviewView implementationMode: ${previewView.implementationMode}")
149
+
150
+ // Set surface provider FIRST, before binding - this is critical
151
+ Log.d(TAG, "[BIND] Setting surface provider BEFORE binding...")
152
+ preview.setSurfaceProvider(previewView.surfaceProvider)
153
+ Log.d(TAG, "[BIND] Surface provider set successfully")
154
+
149
155
  // Unbind all use cases before rebinding
150
156
  Log.d(TAG, "[BIND] Unbinding all existing use cases...")
151
157
  cameraProvider.unbindAll()
@@ -165,20 +171,6 @@ class CameraController(
165
171
  )
166
172
  Log.d(TAG, "[BIND] Bound to lifecycle successfully, camera: $camera")
167
173
 
168
- // Set surface provider AFTER binding for all modes
169
- // This ensures the camera is ready to receive the surface
170
- Log.d(TAG, "[BIND] Binding completed, now setting surface provider...")
171
- Log.d(TAG, "[BIND] PreviewView: $previewView")
172
- Log.d(TAG, "[BIND] PreviewView.surfaceProvider: ${previewView.surfaceProvider}")
173
- Log.d(TAG, "[BIND] PreviewView.implementationMode: ${previewView.implementationMode}")
174
-
175
- // Use postDelayed to ensure surface is ready (especially for SurfaceView)
176
- previewView.post {
177
- Log.d(TAG, "[BIND] Setting surface provider on UI thread...")
178
- preview.setSurfaceProvider(previewView.surfaceProvider)
179
- Log.d(TAG, "[BIND] Surface provider set successfully")
180
- }
181
-
182
174
  // Restore torch state if it was enabled
183
175
  if (torchEnabled) {
184
176
  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.179.0",
3
+ "version": "3.180.0",
4
4
  "description": "Native-backed document scanner for React Native with customizable overlays.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",