react-native-rectangle-doc-scanner 3.224.0 → 3.225.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.
@@ -175,9 +175,9 @@ class CameraController(
175
175
 
176
176
  val rotation = previewView.display?.rotation ?: Surface.ROTATION_0
177
177
 
178
- // Build Preview ONLY - this device cannot handle 2 simultaneous surfaces initially
178
+ // Build Preview ONLY with minimal resolution to reduce HAL load
179
179
  preview = Preview.Builder()
180
- .setTargetResolution(Size(1280, 720))
180
+ .setTargetResolution(Size(640, 480))
181
181
  .setTargetRotation(rotation)
182
182
  .build()
183
183
  .also {
@@ -199,11 +199,13 @@ class CameraController(
199
199
  preview
200
200
  )
201
201
 
202
- Log.d(TAG, "[CAMERAX-V8] Preview ONLY bound successfully - camera preview should be visible")
202
+ Log.d(TAG, "[CAMERAX-V9] Preview bound with 640x480 resolution")
203
+ Log.d(TAG, "[CAMERAX-V9] Waiting for capture session to configure...")
203
204
 
204
- // DO NOT try to add ImageCapture - this device cannot handle it
205
- // Keep Preview only mode
206
- Log.d(TAG, "[CAMERAX-V8] Running in Preview-only mode (no auto-detection)")
205
+ // Log session state after some time
206
+ android.os.Handler(android.os.Looper.getMainLooper()).postDelayed({
207
+ Log.d(TAG, "[CAMERAX-V9] Camera state check - preview should be working now")
208
+ }, 6000)
207
209
 
208
210
  } catch (e: Exception) {
209
211
  Log.e(TAG, "[CAMERAX-V8] Failed to bind preview", e)
@@ -78,7 +78,7 @@ class DocumentScannerView(context: ThemedReactContext) : FrameLayout(context), L
78
78
  layoutParams = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
79
79
  visibility = View.VISIBLE
80
80
  keepScreenOn = true
81
- implementationMode = PreviewView.ImplementationMode.PERFORMANCE
81
+ implementationMode = PreviewView.ImplementationMode.COMPATIBLE
82
82
  scaleType = PreviewView.ScaleType.FILL_CENTER
83
83
  }
84
84
  Log.d(TAG, "[INIT] PreviewView created: $previewView")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-rectangle-doc-scanner",
3
- "version": "3.224.0",
3
+ "version": "3.225.0",
4
4
  "description": "Native-backed document scanner for React Native with customizable overlays.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",