react-native-rectangle-doc-scanner 3.220.0 → 3.221.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.
@@ -172,22 +172,24 @@ class CameraController(
172
172
  CameraSelector.DEFAULT_BACK_CAMERA
173
173
  }
174
174
 
175
- // Step 1: Bind Preview ONLY first
175
+ // TEMPORARY: Bind Preview ONLY to test if Preview works without ImageAnalysis
176
176
  try {
177
177
  camera = provider.bindToLifecycle(
178
178
  lifecycleOwner,
179
179
  cameraSelector,
180
180
  preview
181
181
  )
182
- Log.d(TAG, "[CAMERAX-FIX-V5] Preview bound, waiting 2 seconds before adding analysis...")
182
+ Log.d(TAG, "[CAMERAX-DEBUG] Preview ONLY bound successfully - NO ImageAnalysis")
183
+ analysisBound = false
183
184
 
184
- // Step 2: Add ImageAnalysis after a longer delay to let Preview session fully stabilize
185
- android.os.Handler(android.os.Looper.getMainLooper()).postDelayed({
186
- bindImageAnalysis(provider, cameraSelector, rotation)
187
- }, 2000)
185
+ // TODO: If Preview works, we need to find alternative for document detection
186
+ // Options:
187
+ // 1. Use ImageCapture instead of ImageAnalysis
188
+ // 2. Use lower resolution for ImageAnalysis (already tried)
189
+ // 3. Use Camera2 API directly instead of CameraX
188
190
 
189
191
  } catch (e: Exception) {
190
- Log.e(TAG, "[CAMERAX-FIX-V5] Failed to bind preview", e)
192
+ Log.e(TAG, "[CAMERAX-DEBUG] Failed to bind preview", e)
191
193
  analysisBound = false
192
194
  }
193
195
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rectangle-doc-scanner",
3
- "version": "3.220.0",
3
+ "version": "3.221.0",
4
4
  "description": "Native-backed document scanner for React Native with customizable overlays.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",