react-native-rectangle-doc-scanner 3.224.0 → 3.226.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.
|
@@ -9,7 +9,6 @@ import android.graphics.Matrix
|
|
|
9
9
|
import android.graphics.Rect
|
|
10
10
|
import android.graphics.YuvImage
|
|
11
11
|
import android.util.Log
|
|
12
|
-
import android.util.Size
|
|
13
12
|
import android.view.Surface
|
|
14
13
|
import androidx.camera.core.AspectRatio
|
|
15
14
|
import androidx.camera.core.Camera
|
|
@@ -175,9 +174,9 @@ class CameraController(
|
|
|
175
174
|
|
|
176
175
|
val rotation = previewView.display?.rotation ?: Surface.ROTATION_0
|
|
177
176
|
|
|
178
|
-
// Build Preview
|
|
177
|
+
// Build Preview without a fixed size to avoid unsupported stream configs.
|
|
179
178
|
preview = Preview.Builder()
|
|
180
|
-
.
|
|
179
|
+
.setTargetAspectRatio(AspectRatio.RATIO_4_3)
|
|
181
180
|
.setTargetRotation(rotation)
|
|
182
181
|
.build()
|
|
183
182
|
.also {
|
|
@@ -199,11 +198,13 @@ class CameraController(
|
|
|
199
198
|
preview
|
|
200
199
|
)
|
|
201
200
|
|
|
202
|
-
Log.d(TAG, "[CAMERAX-
|
|
201
|
+
Log.d(TAG, "[CAMERAX-V9] Preview bound with 640x480 resolution")
|
|
202
|
+
Log.d(TAG, "[CAMERAX-V9] Waiting for capture session to configure...")
|
|
203
203
|
|
|
204
|
-
//
|
|
205
|
-
|
|
206
|
-
|
|
204
|
+
// Log session state after some time
|
|
205
|
+
android.os.Handler(android.os.Looper.getMainLooper()).postDelayed({
|
|
206
|
+
Log.d(TAG, "[CAMERAX-V9] Camera state check - preview should be working now")
|
|
207
|
+
}, 6000)
|
|
207
208
|
|
|
208
209
|
} catch (e: Exception) {
|
|
209
210
|
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.
|
|
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