Closed mszczotarz closed 2 months ago
Guten Tag, Hans here! π»
Thanks for your detailed report. It looks like you're experiencing an issue with scanning larger Aztec codes on Android after upgrading to version 4.5.2. Your logs are quite extensive, but I need to clarify a bit more about the logs specific to the problem.
Could you please check if there are any errors in the adb logcat output while trying to scan? To gather these logs, open a terminal or command prompt, and run:
adb logcat | grep -i vision-camera
This will help us identify any specific runtime errors related to the library. Also, providing your test scenarios and if possible, a minimal reproducible example would greatly help!
And remember, if you find this project useful, consider supporting its continued development by becoming a sponsor! Sponsor mrousavy.
Looking forward to your updates!
Note: If you think I made a mistake, please ping
@mrousavy
to take a look.
@mrousavy logs added
If you have some custom use-cases, please create your own code scanner plugin and run it in a Frame Processor. This gives you more control, e.g. via tweaking resolution or accuracy.
The integrated code scanner is a lightweight and simple codescanner, which uses device native features.
What's happening?
I cannot scan large Aztec code (example provided bellow) on Android. iOS works fine and worked on android before upgrade react-native-vision-camera from
3.5.1
to4.5.2
.It works for smaller Aztec without any problems, so i don't think this is some kind of configuration issue.
Working (smaller) Aztec code:
On Google ML Kit website https://developers.google.com/ml-kit/vision/barcode-scanning/android#performance-tips it's mentioned:
Maybe this is some hint, but if I understand correctly native code, strategy is not changed for scanner...
This Aztec code doesn't work (works on android with react-native-vision-camera 3.5.1:
P.S I checked on example app and the issue is the same (changed scanner config to
aztec
).Reproduceable Code
Relevant log output
Logs
```shell ViewPostIme pointer 0 ViewPostIme pointer 1 unregisterListener handleWindowFocusChanged: 0 0 call from android.view.ViewRootImpl.-$$Nest$mhandleWindowFocusChanged:0 onPreWindowFocus: skipped, hasWindowFocus=false mHasImeFocus=true onPostWindowFocus: skipped, hasWindowFocus=false mHasImeFocus=true Compat change id reported: 78294732; UID 10406; state: ENABLED registerListener :: 1, LSM6DSOTR Accelerometer, 66667, 0, applyRequestedVisibilityToControl: visible=true, type=navigationBars, host=com.app/com.app.MainActivity applyRequestedVisibilityToControl: visible=true, type=statusBars, host=com.app/com.app.MainActivity update, w= 1080 h= 2400 mName = ViewRootImpl@83f1832[MainActivity] mNativeObject= 0xb400006f0f2b1330 sc.mNativeObject= 0xb400006edf2a8390 format= -1 caller= android.view.ViewRootImpl.updateBlastSurfaceIfNeeded:3017 android.view.ViewRootImpl.relayoutWindow:10131 android.view.ViewRootImpl.performTraversals:4110 android.view.ViewRootImpl.doTraversal:3288 android.view.ViewRootImpl$TraversalRunnable.run:11344 android.view.Choreographer$CallbackRecord.run:1689 Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) relayoutAsync=true req=(1080,2400)0 dur=1 res=0x0 s={true 0xb400006fdf2eebe0} ch=false seqId=0 registerCallbackForPendingTransactions Input channel destroyed: 'ClientS', fd=139 mWNT: t=0xb400006eaf954150 mBlastBufferQueue=0xb400006f0f2b1330 fn= 922 mRenderHdrSdrRatio=1.0 caller= android.view.ViewRootImpl$6.onFrameDraw:5635 android.view.ViewRootImpl$2.onFrameDraw:2146 android.view.ThreadedRenderer$1.onFrameDraw:792 handleWindowFocusChanged: 1 0 call from android.view.ViewRootImpl.-$$Nest$mhandleWindowFocusChanged:0 mThreadedRenderer.initializeIfNeeded()#2 mSurface={isValid=true 0xb400006fdf2eebe0} startInputInner - Id : 0 startInputInner - IInputMethodManagerGlobalInvoker.startInputOrWindowGainedFocus tagSocket(75) with statsTag=0xffffffff, statsUid=-1 applyRequestedVisibilityToControl: visible=false, type=ime, host=com.app/com.app.MainActivity profiles = ImmutableEncoderProfilesProxy{defaultDurationSeconds=30, recommendedFileFormat=2, audioProfiles=[AudioProfileProxy{codec=3, mediaType=audio/mp4a-latm, bitrate=256000, sampleRate=48000, channels=2, profile=1}], videoProfiles=[VideoProfileProxy{codec=2, mediaType=video/avc, bitrate=48000000, frameRate=30, width=3840, height=2160, profile=-1, bitDepth=8, chromaSubsampling=0, hdrFormat=0}]} profiles = ImmutableEncoderProfilesProxy{defaultDurationSeconds=30, recommendedFileFormat=2, audioProfiles=[AudioProfileProxy{codec=3, mediaType=audio/mp4a-latm, bitrate=256000, sampleRate=48000, channels=2, profile=1}], videoProfiles=[VideoProfileProxy{codec=2, mediaType=video/avc, bitrate=17000000, frameRate=30, width=1920, height=1080, profile=-1, bitDepth=8, chromaSubsampling=0, hdrFormat=0}]} profiles = ImmutableEncoderProfilesProxy{defaultDurationSeconds=30, recommendedFileFormat=2, audioProfiles=[AudioProfileProxy{codec=3, mediaType=audio/mp4a-latm, bitrate=256000, sampleRate=48000, channels=2, profile=1}], videoProfiles=[VideoProfileProxy{codec=2, mediaType=video/avc, bitrate=12000000, frameRate=30, width=1280, height=720, profile=-1, bitDepth=8, chromaSubsampling=0, hdrFormat=0}]} profiles = ImmutableEncoderProfilesProxy{defaultDurationSeconds=30, recommendedFileFormat=2, audioProfiles=[AudioProfileProxy{codec=3, mediaType=audio/mp4a-latm, bitrate=256000, sampleRate=48000, channels=2, profile=1}], videoProfiles=[VideoProfileProxy{codec=2, mediaType=video/avc, bitrate=3449000, frameRate=30, width=720, height=480, profile=-1, bitDepth=8, chromaSubsampling=0, hdrFormat=0}]} isAvailableFeature(mode 202) : true isAvailableDynamicShotInfo : true isExtensionAvailable: cameraId = 0, true isAvailableFeature(mode 201) : false isExtensionAvailable: cameraId = 0, false isAvailableFeature(mode 203) : false isExtensionAvailable: cameraId = 0, false profiles = ImmutableEncoderProfilesProxy{defaultDurationSeconds=30, recommendedFileFormat=2, audioProfiles=[AudioProfileProxy{codec=3, mediaType=audio/mp4a-latm, bitrate=256000, sampleRate=48000, channels=2, profile=1}], videoProfiles=[VideoProfileProxy{codec=2, mediaType=video/avc, bitrate=17000000, frameRate=30, width=1920, height=1080, profile=-1, bitDepth=8, chromaSubsampling=0, hdrFormat=0}]} profiles = ImmutableEncoderProfilesProxy{defaultDurationSeconds=30, recommendedFileFormat=2, audioProfiles=[AudioProfileProxy{codec=3, mediaType=audio/mp4a-latm, bitrate=256000, sampleRate=48000, channels=2, profile=1}], videoProfiles=[VideoProfileProxy{codec=2, mediaType=video/avc, bitrate=12000000, frameRate=30, width=1280, height=720, profile=-1, bitDepth=8, chromaSubsampling=0, hdrFormat=0}]} profiles = ImmutableEncoderProfilesProxy{defaultDurationSeconds=30, recommendedFileFormat=2, audioProfiles=[AudioProfileProxy{codec=3, mediaType=audio/mp4a-latm, bitrate=256000, sampleRate=48000, channels=2, profile=1}], videoProfiles=[VideoProfileProxy{codec=2, mediaType=video/avc, bitrate=3449000, frameRate=30, width=720, height=480, profile=-1, bitDepth=8, chromaSubsampling=0, hdrFormat=0}]} isAvailableFeature(mode 202) : true isAvailableDynamicShotInfo : true isExtensionAvailable: cameraId = 1, true isAvailableFeature(mode 201) : false isExtensionAvailable: cameraId = 1, false isAvailableFeature(mode 203) : false isExtensionAvailable: cameraId = 1, false Cleared Reference was only reachable from finalizer (only reported once) profiles = ImmutableEncoderProfilesProxy{defaultDurationSeconds=30, recommendedFileFormat=2, audioProfiles=[AudioProfileProxy{codec=3, mediaType=audio/mp4a-latm, bitrate=256000, sampleRate=48000, channels=2, profile=1}], videoProfiles=[VideoProfileProxy{codec=2, mediaType=video/avc, bitrate=17000000, frameRate=30, width=1920, height=1080, profile=-1, bitDepth=8, chromaSubsampling=0, hdrFormat=0}]} profiles = ImmutableEncoderProfilesProxy{defaultDurationSeconds=30, recommendedFileFormat=2, audioProfiles=[AudioProfileProxy{codec=3, mediaType=audio/mp4a-latm, bitrate=256000, sampleRate=48000, channels=2, profile=1}], videoProfiles=[VideoProfileProxy{codec=2, mediaType=video/avc, bitrate=12000000, frameRate=30, width=1280, height=720, profile=-1, bitDepth=8, chromaSubsampling=0, hdrFormat=0}]} profiles = ImmutableEncoderProfilesProxy{defaultDurationSeconds=30, recommendedFileFormat=2, audioProfiles=[AudioProfileProxy{codec=3, mediaType=audio/mp4a-latm, bitrate=256000, sampleRate=48000, channels=2, profile=1}], videoProfiles=[VideoProfileProxy{codec=2, mediaType=video/avc, bitrate=3449000, frameRate=30, width=720, height=480, profile=-1, bitDepth=8, chromaSubsampling=0, hdrFormat=0}]} isAvailableFeature(mode 202) : true isAvailableDynamicShotInfo : true isExtensionAvailable: cameraId = 2, true isAvailableFeature(mode 201) : false isExtensionAvailable: cameraId = 2, false isAvailableFeature(mode 203) : false isExtensionAvailable: cameraId = 2, false profiles = ImmutableEncoderProfilesProxy{defaultDurationSeconds=30, recommendedFileFormat=2, audioProfiles=[AudioProfileProxy{codec=3, mediaType=audio/mp4a-latm, bitrate=256000, sampleRate=48000, channels=2, profile=1}], videoProfiles=[VideoProfileProxy{codec=2, mediaType=video/avc, bitrate=17000000, frameRate=30, width=1920, height=1080, profile=-1, bitDepth=8, chromaSubsampling=0, hdrFormat=0}]} profiles = ImmutableEncoderProfilesProxy{defaultDurationSeconds=30, recommendedFileFormat=2, audioProfiles=[AudioProfileProxy{codec=3, mediaType=audio/mp4a-latm, bitrate=256000, sampleRate=48000, channels=2, profile=1}], videoProfiles=[VideoProfileProxy{codec=2, mediaType=video/avc, bitrate=12000000, frameRate=30, width=1280, height=720, profile=-1, bitDepth=8, chromaSubsampling=0, hdrFormat=0}]} profiles = ImmutableEncoderProfilesProxy{defaultDurationSeconds=30, recommendedFileFormat=2, audioProfiles=[AudioProfileProxy{codec=3, mediaType=audio/mp4a-latm, bitrate=256000, sampleRate=48000, channels=2, profile=1}], videoProfiles=[VideoProfileProxy{codec=2, mediaType=video/avc, bitrate=3449000, frameRate=30, width=720, height=480, profile=-1, bitDepth=8, chromaSubsampling=0, hdrFormat=0}]} isAvailableFeature(mode 202) : true isAvailableDynamicShotInfo : true isExtensionAvailable: cameraId = 3, true isAvailableFeature(mode 201) : false Input channel destroyed: 'ClientS', fd=138 isExtensionAvailable: cameraId = 3, false isAvailableFeature(mode 203) : false isExtensionAvailable: cameraId = 3, false { "formats": [], "sensorOrientation": "landscape-left", "hardwareLevel": "limited", "maxZoom": 8, "minZoom": 1, "maxExposure": 20, "supportsLowLightBoost": false, "neutralZoom": 1, "physicalDevices": [ "wide-angle-camera" ], "supportsFocus": true, "supportsRawCapture": false, "isMultiCam": false, "minFocusDistance": 10, "minExposure": -20, "name": "0 (BACK) androidx.camera.camera2", "hasFlash": true, "hasTorch": true, "position": "back", "id": "0" } Camera Lifecycle changed to CREATED! Updating CameraSession... Updating CameraSession... Updating CameraSession... configure { ... }: Waiting for lock... A new configure { ... } call arrived, aborting this one... configure { ... }: Waiting for lock... A new configure { ... } call arrived, aborting this one... configure { ... }: Waiting for lock... configure { ... }: Updating CameraSession Configuration... Difference(deviceChanged=true, outputsChanged=true, sidePropsChanged=true, isActiveChanged=true, orientationChanged=true, locationChanged=true) Creating new Outputs for Camera #0... Using FPS Range: null Creating Preview output... Creating CodeScanner output... Considering local module com.google.mlkit.dynamite.barcode:10000 and remote module com.google.mlkit.dynamite.barcode:0 Selected local version of com.google.mlkit.dynamite.barcode Scheduling upload for context TransportContext(cct, DEFAULT, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) with jobId=-779411133 in 488174ms(Backend next call timestamp 1725023966302). Attempt 1 Compat change id reported: 194532703; UID 10406; state: ENABLED Compat change id reported: 253665015; UID 10406; state: ENABLED Scheduling upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) with jobId=-774430396 in 86400000ms(Backend next call timestamp 0). Attempt 1 Successfully created new Outputs for Camera #0! Binding Camera #0... Binding 2 use-cases... Resolved dynamic range for use case androidx.camera.core.Preview-c8075973-14b6-48c5-b2c0-9104380ccf3e to no compatible HDR dynamic ranges. DynamicRange@cd9e63b{encoding=UNSPECIFIED, bitDepth=0} -> DynamicRange@f6aa4ca{encoding=SDR, bitDepth=8} camera2 CameraQuirks = camera2 CameraQuirks = Surface created[total_surfaces=1, used_surfaces=0](androidx.camera.core.processing.SurfaceEdge$SettableSurface@a720b04} Surface created[total_surfaces=2, used_surfaces=0](androidx.camera.core.SurfaceRequest$2@586d370} New surface in use[total_surfaces=2, used_surfaces=1](androidx.camera.core.SurfaceRequest$2@586d370} use count+1, useCount=1 androidx.camera.core.SurfaceRequest$2@586d370 Compat change id reported: 236825255; UID 10406; state: ENABLED Surface created[total_surfaces=3, used_surfaces=1](androidx.camera.core.impl.ImmediateSurface@3b278a5} invokeOnInitialized() Successfully bound Camera #0! {Camera@6bed7b5[id=0]} Use case androidx.camera.core.Preview-c8075973-14b6-48c5-b2c0-9104380ccf3e34479481 ACTIVE Camera Lifecycle changed to STARTED! PreviewView Stream State changed to IDLE Camera State: CLOSED (has error: false) Camera Lifecycle changed to RESUMED! Target Orientation changed DEVICE -> DEVICE! Starting streaming device and screen orientation updates... registerListener :: 1, LSM6DSOTR Accelerometer, 200000, 0, Stopping location updates... configure { ... }: Completed CameraSession Configuration! (State: RESUMED) core DeviceQuirks = SurfaceOrderQuirk | LargeJpegImageQuirk Active and attached use case: [] for camera: 0 {Camera@6bed7b5[id=0]} Use case androidx.camera.core.ImageAnalysis-99e37751-70c3-434f-a20d-3d6b7a6c795726450622 ACTIVE Active and attached use case: [] for camera: 0 {Camera@6bed7b5[id=0]} Use cases [androidx.camera.core.Preview-c8075973-14b6-48c5-b2c0-9104380ccf3e34479481, androidx.camera.core.ImageAnalysis-99e37751-70c3-434f-a20d-3d6b7a6c795726450622] now ATTACHED setActive: isActive = true All use case: [androidx.camera.core.Preview-c8075973-14b6-48c5-b2c0-9104380ccf3e34479481, androidx.camera.core.ImageAnalysis-99e37751-70c3-434f-a20d-3d6b7a6c795726450622] for camera: 0 Active and attached use case: [androidx.camera.core.Preview-c8075973-14b6-48c5-b2c0-9104380ccf3e34479481, androidx.camera.core.ImageAnalysis-99e37751-70c3-434f-a20d-3d6b7a6c795726450622] for camera: 0 CameraView attached to window! {Camera@6bed7b5[id=0]} Resetting Capture Session {Camera@6bed7b5[id=0]} Skipping Capture Session state check due to current camera state: INITIALIZED and previous session status: false {Camera@6bed7b5[id=0]} Releasing session in state INITIALIZED {Camera@6bed7b5[id=0]} Attempting to force open the camera. tryOpenCamera(Camera@6bed7b5[id=0]) [Available Cameras: 1, Already Open: false (Previous state: null)] --> SUCCESS Storing event with priority=DEFAULT, name=FIREBASE_ML_SDK for destination cct Recalculating open cameras: Camera State ------------------------------------------------------------------- Camera@bdf486d[id=1] UNKNOWN Camera@c16241c[id=2] UNKNOWN Camera@6bed7b5[id=0] OPENING Camera@5fdbfc6[id=3] UNKNOWN ------------------------------------------------------------------- Open count: 1 (Max allowed: 1) {Camera@6bed7b5[id=0]} Opening camera. {Camera@6bed7b5[id=0]} Transitioning camera internal state: INITIALIZED --> OPENING New public camera state CameraState{type=OPENING, error=null} from OPENING and null Publishing new public camera state CameraState{type=OPENING, error=null} All use case: [androidx.camera.core.Preview-c8075973-14b6-48c5-b2c0-9104380ccf3e34479481, androidx.camera.core.ImageAnalysis-99e37751-70c3-434f-a20d-3d6b7a6c795726450622] for camera: 0 Upload for context TransportContext(cct, DEFAULT, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) is already scheduled. Returning... Storing event with priority=VERY_LOW, name=FIREBASE_ML_SDK for destination cct Camera 0 facing CAMERA_FACING_BACK state now CAMERA_STATE_OPENING for client com.app API Level 2 User Id 0 Upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) is already scheduled. Returning... Preview orientation changed! PORTRAIT invokeOnPreviewOrientationChanged(PORTRAIT) Output orientation changed! PORTRAIT invokeOnOutputOrientationChanged(PORTRAIT) Compat change id reported: 244358506; UID 10406; state: ENABLED postSingleUpdate device: camera id 0 status STATUS_NOT_AVAILABLE postSingleUpdate device: camera id 0 status STATUS_NOT_AVAILABLE unregisterListener postSingleUpdate device: camera id 0 status STATUS_NOT_AVAILABLE Camera #0 is now unavailable. postSingleUpdate device: camera id 0 status STATUS_NOT_AVAILABLE postSingleUpdate device: camera id 0 status STATUS_NOT_AVAILABLE Camera 0 facing CAMERA_FACING_BACK state now CAMERA_STATE_OPEN for client com.app API Level 2 User Id 0 {Camera@6bed7b5[id=0]} Use case androidx.camera.core.Preview-c8075973-14b6-48c5-b2c0-9104380ccf3e34479481 ACTIVE Surface requested by Preview. view DeviceQuirks = onWindowVisibilityChanged(0) true android.view.SurfaceView{7357a00 V.E...... ......I. 0,0-0,0} of ViewRootImpl@83f1832[MainActivity] 120945152 updateSurface: has no frame 120945152 updateSurface: has no frame Active and attached use case: [androidx.camera.core.Preview-c8075973-14b6-48c5-b2c0-9104380ccf3e34479481, androidx.camera.core.ImageAnalysis-99e37751-70c3-434f-a20d-3d6b7a6c795726450622] for camera: 0 120945152 updateSurface: has no frame { "formats": [], "sensorOrientation": "landscape-left", "hardwareLevel": "limited", "maxZoom": 8, "minZoom": 1, "maxExposure": 20, "supportsLowLightBoost": false, "neutralZoom": 1, "physicalDevices": [ "wide-angle-camera" ], "supportsFocus": true, "supportsRawCapture": false, "isMultiCam": false, "minFocusDistance": 10, "minExposure": -20, "name": "0 (BACK) androidx.camera.camera2", "hasFlash": true, "hasTorch": true, "position": "back", "id": "0" } update, w= 1080 h= 2400 mName = ViewRootImpl@83f1832[MainActivity] mNativeObject= 0xb400006f0f2b1330 sc.mNativeObject= 0xb400006edf2a8390 format= -3 caller= android.view.ViewRootImpl.updateBlastSurfaceIfNeeded:3017 android.view.ViewRootImpl.relayoutWindow:10131 android.view.ViewRootImpl.performTraversals:4110 android.view.ViewRootImpl.doTraversal:3288 android.view.ViewRootImpl$TraversalRunnable.run:11344 android.view.Choreographer$CallbackRecord.run:1689 Relayout returned: old=(0,0,1080,2400) new=(0,0,1080,2400) relayoutAsync=true req=(1080,2400)0 dur=0 res=0x0 s={true 0xb400006fdf2eebe0} ch=false seqId=0 120945152 Changes: creating=true format=true size=true visible=true alpha=false hint=false visible=true left=true top=true z=false attached=true lifecycleStrategy=false {Camera@6bed7b5[id=0]} Use case androidx.camera.core.ImageAnalysis-99e37751-70c3-434f-a20d-3d6b7a6c795726450622 ACTIVE update, w= 1440 h= 1080 mName = null mNativeObject= 0xb400006f0f4422d0 sc.mNativeObject= 0xb400006edf315350 format= 4 caller= android.view.SurfaceView.createBlastSurfaceControls:1517 android.view.SurfaceView.updateSurface:1193 android.view.SurfaceView.lambda$new$0:258 android.view.SurfaceView.$r8$lambda$cm3nmzErr-srXoT_KjIYQgdhFN0:0 android.view.SurfaceView$$ExternalSyntheticLambda2.onPreDraw:2 android.view.ViewTreeObserver.dispatchOnPreDraw:1204 120945152 Cur surface: Surface(name=null)/@0x82f207e pST: sr = Rect(0, 246 - 1440, 1326) sw = 1440 sh = 1080 120945152 performSurfaceTransaction RenderWorker position = [0, 246, 1440, 1326] surfaceSize = 1440x1080 updateSurface: mVisible = true mSurface.isValid() = true updateSurface: mSurfaceCreated = false surfaceChanged = true visibleChanged = true 120945152 visibleChanged -- surfaceCreated surfaceCreated 1 #8 android.view.SurfaceView{7357a00 V.E...... ......ID 0,0-1440,1080} Surface created. 120945152 surfaceChanged -- format=4 w=1440 h=1080 surfaceChanged (1440,1080) 1 #8 android.view.SurfaceView{7357a00 V.E...... ......ID 0,0-1440,1080} Surface changed. Size: 1440x1080 120945152 surfaceRedrawNeeded Active and attached use case: [androidx.camera.core.Preview-c8075973-14b6-48c5-b2c0-9104380ccf3e34479481, androidx.camera.core.ImageAnalysis-99e37751-70c3-434f-a20d-3d6b7a6c795726450622] for camera: 0 120945152 finishedDrawing Layout: x=0 y=246 w=1440 h=1080, frame=Rect(0, 0 - 1440, 1080) registerCallbackForPendingTransactions 120945152 updateSurfacePosition RenderWorker, frameNr = 931, position = [108, 246, 1548, 1326] surfaceSize = 1440x1080 uSP: rtp = Rect(108, 246 - 1548, 1326) rtsw = 1440 rtsh = 1080 onSSPAndSRT: pl = 108 pt = 246 sx = 1.0 sy = 1.0 aOrMT: ViewRootImpl@83f1832[MainActivity] t = android.view.SurfaceControl$Transaction@478362c fN = 931 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:369 mWNT: t=0xb400006eaf8ec5b0 mBlastBufferQueue=0xb400006f0f2b1330 fn= 931 mRenderHdrSdrRatio=1.0 caller= android.view.SurfaceView.applyOrMergeTransaction:1598 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 mWNT: t=0xb400006eaf8eb530 mBlastBufferQueue=0xb400006f0f2b1330 fn= 931 mRenderHdrSdrRatio=1.0 caller= android.view.ViewRootImpl$6.onFrameDraw:5635 android.view.ViewRootImpl$2.onFrameDraw:2146 android.view.ThreadedRenderer$1.onFrameDraw:792 Camera State: OPENING (has error: false) Preview transformation info updated. TransformationInfo{getCropRect=Rect(0, 0 - 1440, 1080), getRotationDegrees=90, getTargetRotation=0, hasCameraTransform=true, getSensorToBufferTransform=Matrix{[1.0, 0.0, 0.0][0.0, 1.0, 0.0][0.0, 0.0, 1.0]}, isMirroring=false} Transformation info set: TransformationInfo{getCropRect=Rect(0, 0 - 1440, 1080), getRotationDegrees=90, getTargetRotation=0, hasCameraTransform=true, getSensorToBufferTransform=Matrix{[1.0, 0.0, 0.0][0.0, 1.0, 0.0][0.0, 0.0, 1.0]}, isMirroring=false} 1440x1080 false Surface set on Preview. {Camera@6bed7b5[id=0]} CameraDevice.onOpened() {Camera@6bed7b5[id=0]} Transitioning camera internal state: OPENING --> OPENED Recalculating open cameras: Camera State ------------------------------------------------------------------- Camera@bdf486d[id=1] UNKNOWN Camera@c16241c[id=2] UNKNOWN Camera@6bed7b5[id=0] OPEN Camera@5fdbfc6[id=3] UNKNOWN ------------------------------------------------------------------- Open count: 1 (Max allowed: 1) New public camera state CameraState{type=OPEN, error=null} from OPEN and null Publishing new public camera state CameraState{type=OPEN, error=null} All use case: [androidx.camera.core.Preview-c8075973-14b6-48c5-b2c0-9104380ccf3e34479481, androidx.camera.core.ImageAnalysis-99e37751-70c3-434f-a20d-3d6b7a6c795726450622] for camera: 0 120945152 Changes: creating=false format=false size=false visible=false alpha=false hint=false visible=false left=true top=false z=false attached=true lifecycleStrategy=false 120945152 Cur surface: Surface(name=null)/@0x82f207e updateSurface: mVisible = true mSurface.isValid() = true updateSurface: mSurfaceCreated = true surfaceChanged = false visibleChanged = false Layout: x=-150 y=246 w=1440 h=1080, frame=Rect(0, 0 - 1440, 1080) registerCallbackForPendingTransactions 120945152 updateSurfacePosition RenderWorker, frameNr = 932, position = [-136, 246, 1244, 2085] surfaceSize = 1440x1080 uSP: rtp = Rect(-136, 246 - 1244, 2085) rtsw = 1440 rtsh = 1080 onSSPAndSRT: pl = -136 pt = 246 sx = 0.9583333 sy = 1.7027777 aOrMT: ViewRootImpl@83f1832[MainActivity] t = android.view.SurfaceControl$Transaction@478362c fN = 932 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:369 mWNT: t=0xb400006eaf8ec5b0 mBlastBufferQueue=0xb400006f0f2b1330 fn= 932 mRenderHdrSdrRatio=1.0 caller= android.view.SurfaceView.applyOrMergeTransaction:1598 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 Active and attached use case: [androidx.camera.core.Preview-c8075973-14b6-48c5-b2c0-9104380ccf3e34479481, androidx.camera.core.ImageAnalysis-99e37751-70c3-434f-a20d-3d6b7a6c795726450622] for camera: 0 mWNT: t=0xb400006eaf8e99b0 mBlastBufferQueue=0xb400006f0f2b1330 fn= 932 mRenderHdrSdrRatio=1.0 caller= android.view.ViewRootImpl$6.onFrameDraw:5635 android.view.ViewRootImpl$2.onFrameDraw:2146 android.view.ThreadedRenderer$1.onFrameDraw:792 handleWindowFocusChanged: 0 0 call from android.view.ViewRootImpl.-$$Nest$mhandleWindowFocusChanged:0 onPreWindowFocus: skipped, hasWindowFocus=false mHasImeFocus=true onPostWindowFocus: skipped, hasWindowFocus=false mHasImeFocus=true 120945152 updateSurfacePosition RenderWorker, frameNr = 933, position = [-141, 246, 1239, 2085] surfaceSize = 1440x1080 uSP: rtp = Rect(-141, 246 - 1239, 2085) rtsw = 1440 rtsh = 1080 onSSPAndSRT: pl = -141 pt = 246 sx = 0.9583333 sy = 1.7027777 aOrMT: ViewRootImpl@83f1832[MainActivity] t = android.view.SurfaceControl$Transaction@478362c fN = 933 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:369 mWNT: t=0xb400006eaf8ec5b0 mBlastBufferQueue=0xb400006f0f2b1330 fn= 933 mRenderHdrSdrRatio=1.0 caller= android.view.SurfaceView.applyOrMergeTransaction:1598 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 Camera State: OPEN (has error: false) invokeOnStarted() Updating CameraSession... [androidx.camera.camera2.internal.SynchronizedCaptureSessionImpl@5fc6848] getSurface done with results: [Surface(name=null)/@0x82f207e, Surface(name=null)/@0x637e63a] Opening capture session. 120945152 updateSurfacePosition RenderWorker, frameNr = 934, position = [-145, 246, 1236, 2085] surfaceSize = 1440x1080 uSP: rtp = Rect(-145, 246 - 1236, 2085) rtsw = 1440 rtsh = 1080 onSSPAndSRT: pl = -145 pt = 246 sx = 0.95902777 sy = 1.7027777 aOrMT: ViewRootImpl@83f1832[MainActivity] t = android.view.SurfaceControl$Transaction@478362c fN = 934 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:369 mWNT: t=0xb400006eaf8ec5b0 mBlastBufferQueue=0xb400006f0f2b1330 fn= 934 mRenderHdrSdrRatio=1.0 caller= android.view.SurfaceView.applyOrMergeTransaction:1598 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 configure { ... }: Waiting for lock... configure { ... }: Updating CameraSession Configuration... Difference(deviceChanged=false, outputsChanged=false, sidePropsChanged=false, isActiveChanged=true, orientationChanged=false, locationChanged=false) Camera Lifecycle changed to STARTED! Camera Lifecycle changed to CREATED! configure { ... }: Completed CameraSession Configuration! (State: CREATED) template type = 1 120945152 updateSurfacePosition RenderWorker, frameNr = 935, position = [-145, 246, 1235, 2085] surfaceSize = 1440x1080 uSP: rtp = Rect(-145, 246 - 1235, 2085) rtsw = 1440 rtsh = 1080 onSSPAndSRT: pl = -145 pt = 246 sx = 0.9583333 sy = 1.7027777 aOrMT: ViewRootImpl@83f1832[MainActivity] t = android.view.SurfaceControl$Transaction@478362c fN = 935 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:369 mWNT: t=0xb400006eaf8ec5b0 mBlastBufferQueue=0xb400006f0f2b1330 fn= 935 mRenderHdrSdrRatio=1.0 caller= android.view.SurfaceView.applyOrMergeTransaction:1598 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 {Camera@6bed7b5[id=0]} Use cases [androidx.camera.core.Preview-c8075973-14b6-48c5-b2c0-9104380ccf3e34479481, androidx.camera.core.ImageAnalysis-99e37751-70c3-434f-a20d-3d6b7a6c795726450622] now DETACHED for camera All use case: [] for camera: 0 {Camera@6bed7b5[id=0]} Resetting Capture Session {Camera@6bed7b5[id=0]} Releasing session in state OPENED setActive: isActive = false Active and attached use case: [] for camera: 0 Active and attached use case: [] for camera: 0 120945152 updateSurfacePosition RenderWorker, frameNr = 936, position = [-146, 246, 1234, 2085] surfaceSize = 1440x1080 uSP: rtp = Rect(-146, 246 - 1234, 2085) rtsw = 1440 rtsh = 1080 onSSPAndSRT: pl = -146 pt = 246 sx = 0.9583333 sy = 1.7027777 resetDirectly: mVideoUsage reset! aOrMT: ViewRootImpl@83f1832[MainActivity] t = android.view.SurfaceControl$Transaction@478362c fN = 936 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:369 mWNT: t=0xb400006eaf8ec5b0 mBlastBufferQueue=0xb400006f0f2b1330 fn= 936 mRenderHdrSdrRatio=1.0 caller= android.view.SurfaceView.applyOrMergeTransaction:1598 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 {Camera@6bed7b5[id=0]} Closing camera. {Camera@6bed7b5[id=0]} Transitioning camera internal state: OPENED --> CLOSING Recalculating open cameras: Camera State ------------------------------------------------------------------- Camera@bdf486d[id=1] UNKNOWN Camera@c16241c[id=2] UNKNOWN Camera@6bed7b5[id=0] CLOSING Camera@5fdbfc6[id=3] UNKNOWN ------------------------------------------------------------------- Open count: 1 (Max allowed: 1) New public camera state CameraState{type=CLOSING, error=null} from CLOSING and null Publishing new public camera state CameraState{type=CLOSING, error=null} {Camera@6bed7b5[id=0]} Resetting Capture Session {Camera@6bed7b5[id=0]} Skipping Capture Session state check due to current camera state: CLOSING and previous session status: false {Camera@6bed7b5[id=0]} Releasing session in state CLOSING {Camera@6bed7b5[id=0]} closing camera 120945152 updateSurfacePosition RenderWorker, frameNr = 938, position = [-147, 246, 1234, 2085] surfaceSize = 1440x1080 uSP: rtp = Rect(-147, 246 - 1234, 2085) rtsw = 1440 rtsh = 1080 onSSPAndSRT: pl = -147 pt = 246 sx = 0.95902777 sy = 1.7027777 aOrMT: ViewRootImpl@83f1832[MainActivity] t = android.view.SurfaceControl$Transaction@478362c fN = 938 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:369 mWNT: t=0xb400006eaf8ec5b0 mBlastBufferQueue=0xb400006f0f2b1330 fn= 938 mRenderHdrSdrRatio=1.0 caller= android.view.SurfaceView.applyOrMergeTransaction:1598 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 120945152 updateSurfacePosition RenderWorker, frameNr = 939, position = [-147, 246, 1233, 2085] surfaceSize = 1440x1080 uSP: rtp = Rect(-147, 246 - 1233, 2085) rtsw = 1440 rtsh = 1080 onSSPAndSRT: pl = -147 pt = 246 sx = 0.9583333 sy = 1.7027777 aOrMT: ViewRootImpl@83f1832[MainActivity] t = android.view.SurfaceControl$Transaction@478362c fN = 939 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:369 mWNT: t=0xb400006eaf8ec5b0 mBlastBufferQueue=0xb400006f0f2b1330 fn= 939 mRenderHdrSdrRatio=1.0 caller= android.view.SurfaceView.applyOrMergeTransaction:1598 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 120945152 updateSurfacePosition RenderWorker, frameNr = 941, position = [-148, 246, 1233, 2085] surfaceSize = 1440x1080 uSP: rtp = Rect(-148, 246 - 1233, 2085) rtsw = 1440 rtsh = 1080 onSSPAndSRT: pl = -148 pt = 246 sx = 0.95902777 sy = 1.7027777 aOrMT: ViewRootImpl@83f1832[MainActivity] t = android.view.SurfaceControl$Transaction@478362c fN = 941 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:369 mWNT: t=0xb400006eaf8ec5b0 mBlastBufferQueue=0xb400006f0f2b1330 fn= 941 mRenderHdrSdrRatio=1.0 caller= android.view.SurfaceView.applyOrMergeTransaction:1598 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 Input channel destroyed: 'ClientS', fd=146 120945152 updateSurfacePosition RenderWorker, frameNr = 942, position = [-148, 246, 1232, 2085] surfaceSize = 1440x1080 uSP: rtp = Rect(-148, 246 - 1232, 2085) rtsw = 1440 rtsh = 1080 onSSPAndSRT: pl = -148 pt = 246 sx = 0.9583333 sy = 1.7027777 aOrMT: ViewRootImpl@83f1832[MainActivity] t = android.view.SurfaceControl$Transaction@478362c fN = 942 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:369 mWNT: t=0xb400006eaf8ec5b0 mBlastBufferQueue=0xb400006f0f2b1330 fn= 942 mRenderHdrSdrRatio=1.0 caller= android.view.SurfaceView.applyOrMergeTransaction:1598 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 120945152 updateSurfacePosition RenderWorker, frameNr = 945, position = [-149, 246, 1232, 2085] surfaceSize = 1440x1080 uSP: rtp = Rect(-149, 246 - 1232, 2085) rtsw = 1440 rtsh = 1080 onSSPAndSRT: pl = -149 pt = 246 sx = 0.95902777 sy = 1.7027777 aOrMT: ViewRootImpl@83f1832[MainActivity] t = android.view.SurfaceControl$Transaction@478362c fN = 945 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:369 mWNT: t=0xb400006eaf8ec5b0 mBlastBufferQueue=0xb400006f0f2b1330 fn= 945 mRenderHdrSdrRatio=1.0 caller= android.view.SurfaceView.applyOrMergeTransaction:1598 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 120945152 updateSurfacePosition RenderWorker, frameNr = 946, position = [-149, 246, 1231, 2085] surfaceSize = 1440x1080 uSP: rtp = Rect(-149, 246 - 1231, 2085) rtsw = 1440 rtsh = 1080 onSSPAndSRT: pl = -149 pt = 246 sx = 0.9583333 sy = 1.7027777 aOrMT: ViewRootImpl@83f1832[MainActivity] t = android.view.SurfaceControl$Transaction@478362c fN = 946 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:369 mWNT: t=0xb400006eaf8ec5b0 mBlastBufferQueue=0xb400006f0f2b1330 fn= 946 mRenderHdrSdrRatio=1.0 caller= android.view.SurfaceView.applyOrMergeTransaction:1598 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 registerListener :: 1, LSM6DSOTR Accelerometer, 66667, 0, applyRequestedVisibilityToControl: visible=true, type=navigationBars, host=com.app/com.app.MainActivity applyRequestedVisibilityToControl: visible=true, type=statusBars, host=com.app/com.app.MainActivity handleWindowFocusChanged: 1 0 call from android.view.ViewRootImpl.-$$Nest$mhandleWindowFocusChanged:0 mThreadedRenderer.initializeIfNeeded()#2 mSurface={isValid=true 0xb400006fdf2eebe0} startInputInner - Id : 0 startInputInner - IInputMethodManagerGlobalInvoker.startInputOrWindowGainedFocus tagSocket(75) with statsTag=0xffffffff, statsUid=-1 { "formats": [], "sensorOrientation": "landscape-left", "hardwareLevel": "limited", "maxZoom": 8, "minZoom": 1, "maxExposure": 20, "supportsLowLightBoost": false, "neutralZoom": 1, "physicalDevices": [ "wide-angle-camera" ], "supportsFocus": true, "supportsRawCapture": false, "isMultiCam": false, "minFocusDistance": 10, "minExposure": -20, "name": "0 (BACK) androidx.camera.camera2", "hasFlash": true, "hasTorch": true, "position": "back", "id": "0" } 120945152 updateSurfacePosition RenderWorker, frameNr = 950, position = [-150, 246, 1231, 2085] surfaceSize = 1440x1080 uSP: rtp = Rect(-150, 246 - 1231, 2085) rtsw = 1440 rtsh = 1080 onSSPAndSRT: pl = -150 pt = 246 sx = 0.95902777 sy = 1.7027777 aOrMT: ViewRootImpl@83f1832[MainActivity] t = android.view.SurfaceControl$Transaction@478362c fN = 950 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:369 mWNT: t=0xb400006eaf8ec5b0 mBlastBufferQueue=0xb400006f0f2b1330 fn= 950 mRenderHdrSdrRatio=1.0 caller= android.view.SurfaceView.applyOrMergeTransaction:1598 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 postSingleUpdate device: camera id 0 status STATUS_PRESENT Camera #0 is now available. 120945152 updateSurfacePosition RenderWorker, frameNr = 951, position = [-150, 246, 1230, 2085] surfaceSize = 1440x1080 uSP: rtp = Rect(-150, 246 - 1230, 2085) rtsw = 1440 rtsh = 1080 onSSPAndSRT: pl = -150 pt = 246 sx = 0.9583333 sy = 1.7027777 aOrMT: ViewRootImpl@83f1832[MainActivity] t = android.view.SurfaceControl$Transaction@478362c fN = 951 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 android.graphics.RenderNode$CompositePositionUpdateListener.positionChanged:369 mWNT: t=0xb400006eaf8ec5b0 mBlastBufferQueue=0xb400006f0f2b1330 fn= 951 mRenderHdrSdrRatio=1.0 caller= android.view.SurfaceView.applyOrMergeTransaction:1598 android.view.SurfaceView.-$$Nest$mapplyOrMergeTransaction:0 android.view.SurfaceView$SurfaceViewPositionUpdateListener.positionChanged:1666 postSingleUpdate device: camera id 0 status STATUS_PRESENT postSingleUpdate device: camera id 0 status STATUS_PRESENT [androidx.camera.camera2.internal.SynchronizedCaptureSessionImpl@5fc6848] start openCaptureSession {Camera@6bed7b5[id=0]} CameraDevice.onClosed() postSingleUpdate device: camera id 0 status STATUS_PRESENT {Camera@6bed7b5[id=0]} Transitioning camera internal state: CLOSING --> INITIALIZED Recalculating open cameras: Camera State ------------------------------------------------------------------- Camera@bdf486d[id=1] UNKNOWN Camera@c16241c[id=2] UNKNOWN Camera@6bed7b5[id=0] CLOSED Camera@5fdbfc6[id=3] UNKNOWN ------------------------------------------------------------------- Open count: 0 (Max allowed: 1) New public camera state CameraState{type=CLOSED, error=null} from CLOSED and null Publishing new public camera state CameraState{type=CLOSED, error=null} Active and attached use case: [] for camera: 0 postSingleUpdate device: camera id 0 status STATUS_PRESENT {Camera@6bed7b5[id=0]} Unable to configure camera cancelled applyRequestedVisibilityToControl: visible=false, type=ime, host=com.app/com.app.MainActivity Camera 0 facing CAMERA_FACING_BACK state now CAMERA_STATE_CLOSED for client com.app API Level 2 User Id 0 { "formats": [], "sensorOrientation": "landscape-left", "hardwareLevel": "limited", "maxZoom": 8, "minZoom": 1, "maxExposure": 20, "supportsLowLightBoost": false, "neutralZoom": 1, "physicalDevices": [ "wide-angle-camera" ], "supportsFocus": true, "supportsRawCapture": false, "isMultiCam": false, "minFocusDistance": 10, "minExposure": -20, "name": "0 (BACK) androidx.camera.camera2", "hasFlash": true, "hasTorch": true, "position": "back", "id": "0" } Updating CameraSession... configure { ... }: Waiting for lock... configure { ... }: Updating CameraSession Configuration... Difference(deviceChanged=false, outputsChanged=false, sidePropsChanged=false, isActiveChanged=true, orientationChanged=false, locationChanged=false) Camera Lifecycle changed to STARTED! Camera State: CLOSED (has error: false) invokeOnStopped() Camera Lifecycle changed to RESUMED! configure { ... }: Completed CameraSession Configuration! (State: RESUMED) { "formats": [], "sensorOrientation": "landscape-left", "hardwareLevel": "limited", "maxZoom": 8, "minZoom": 1, "maxExposure": 20, "supportsLowLightBoost": false, "neutralZoom": 1, "physicalDevices": [ "wide-angle-camera" ], "supportsFocus": true, "supportsRawCapture": false, "isMultiCam": false, "minFocusDistance": 10, "minExposure": -20, "name": "0 (BACK) androidx.camera.camera2", "hasFlash": true, "hasTorch": true, "position": "back", "id": "0" } {Camera@6bed7b5[id=0]} Use cases [androidx.camera.core.Preview-c8075973-14b6-48c5-b2c0-9104380ccf3e34479481, androidx.camera.core.ImageAnalysis-99e37751-70c3-434f-a20d-3d6b7a6c795726450622] now ATTACHED setActive: isActive = true All use case: [androidx.camera.core.Preview-c8075973-14b6-48c5-b2c0-9104380ccf3e34479481, androidx.camera.core.ImageAnalysis-99e37751-70c3-434f-a20d-3d6b7a6c795726450622] for camera: 0 Active and attached use case: [] for camera: 0 {Camera@6bed7b5[id=0]} Resetting Capture Session {Camera@6bed7b5[id=0]} Skipping Capture Session state check due to current camera state: INITIALIZED and previous session status: false {Camera@6bed7b5[id=0]} Releasing session in state INITIALIZED {Camera@6bed7b5[id=0]} Attempting to force open the camera. tryOpenCamera(Camera@6bed7b5[id=0]) [Available Cameras: 1, Already Open: false (Previous state: CLOSED)] --> SUCCESS Recalculating open cameras: Camera State ------------------------------------------------------------------- Camera@bdf486d[id=1] UNKNOWN Camera@c16241c[id=2] UNKNOWN Camera@6bed7b5[id=0] OPENING Camera@5fdbfc6[id=3] UNKNOWN ------------------------------------------------------------------- Open count: 1 (Max allowed: 1) {Camera@6bed7b5[id=0]} Opening camera. {Camera@6bed7b5[id=0]} Transitioning camera internal state: INITIALIZED --> OPENING New public camera state CameraState{type=OPENING, error=null} from OPENING and null Publishing new public camera state CameraState{type=OPENING, error=null} Camera State: OPENING (has error: false) All use case: [androidx.camera.core.Preview-c8075973-14b6-48c5-b2c0-9104380ccf3e34479481, androidx.camera.core.ImageAnalysis-99e37751-70c3-434f-a20d-3d6b7a6c795726450622] for camera: 0 Camera 0 facing CAMERA_FACING_BACK state now CAMERA_STATE_OPENING for client com.app API Level 2 User Id 0 {Camera@6bed7b5[id=0]} Use case androidx.camera.core.Preview-c8075973-14b6-48c5-b2c0-9104380ccf3e34479481 ACTIVE Active and attached use case: [androidx.camera.core.Preview-c8075973-14b6-48c5-b2c0-9104380ccf3e34479481] for camera: 0 {Camera@6bed7b5[id=0]} Use case androidx.camera.core.ImageAnalysis-99e37751-70c3-434f-a20d-3d6b7a6c795726450622 ACTIVE postSingleUpdate device: camera id 0 status STATUS_NOT_AVAILABLE Camera #0 is now unavailable. Active and attached use case: [androidx.camera.core.Preview-c8075973-14b6-48c5-b2c0-9104380ccf3e34479481, androidx.camera.core.ImageAnalysis-99e37751-70c3-434f-a20d-3d6b7a6c795726450622] for camera: 0 postSingleUpdate device: camera id 0 status STATUS_NOT_AVAILABLE postSingleUpdate device: camera id 0 status STATUS_NOT_AVAILABLE postSingleUpdate device: camera id 0 status STATUS_NOT_AVAILABLE postSingleUpdate device: camera id 0 status STATUS_NOT_AVAILABLE {Camera@6bed7b5[id=0]} CameraDevice.onOpened() {Camera@6bed7b5[id=0]} Transitioning camera internal state: OPENING --> OPENED Camera 0 facing CAMERA_FACING_BACK state now CAMERA_STATE_OPEN for client com.app API Level 2 User Id 0 Recalculating open cameras: Camera State ------------------------------------------------------------------- Camera@bdf486d[id=1] UNKNOWN Camera@c16241c[id=2] UNKNOWN Camera@6bed7b5[id=0] OPEN Camera@5fdbfc6[id=3] UNKNOWN ------------------------------------------------------------------- Open count: 1 (Max allowed: 1) New public camera state CameraState{type=OPEN, error=null} from OPEN and null Publishing new public camera state CameraState{type=OPEN, error=null} Camera State: OPEN (has error: false) invokeOnStarted() All use case: [androidx.camera.core.Preview-c8075973-14b6-48c5-b2c0-9104380ccf3e34479481, androidx.camera.core.ImageAnalysis-99e37751-70c3-434f-a20d-3d6b7a6c795726450622] for camera: 0 Active and attached use case: [androidx.camera.core.Preview-c8075973-14b6-48c5-b2c0-9104380ccf3e34479481, androidx.camera.core.ImageAnalysis-99e37751-70c3-434f-a20d-3d6b7a6c795726450622] for camera: 0 [androidx.camera.camera2.internal.SynchronizedCaptureSessionImpl@e7fb033] getSurface done with results: [Surface(name=null)/@0x82f207e, Surface(name=null)/@0x637e63a] Opening capture session. template type = 1 [androidx.camera.camera2.internal.SynchronizedCaptureSessionImpl@e7fb033] start openCaptureSession use count+1, useCount=2 androidx.camera.core.SurfaceRequest$2@586d370 New surface in use[total_surfaces=3, used_surfaces=2](androidx.camera.core.impl.ImmediateSurface@3b278a5} use count+1, useCount=1 androidx.camera.core.impl.ImmediateSurface@3b278a5 [androidx.camera.camera2.internal.SynchronizedCaptureSessionImpl@e7fb033] Session onConfigured() Attempting to send capture request onConfigured Issuing request for session. createCaptureRequest CameraCaptureSession.onConfigured() mState=OPENED CameraCaptureSession.onReady() OPENED Camera 0 facing CAMERA_FACING_BACK state now CAMERA_STATE_ACTIVE for client com.app API Level 2 User Id 0 onDisplayChanged oldDisplayState=2 newDisplayState=2 invokeOnAverageFpsChanged(0.0) [SurfaceView[com.app/com.app.MainActivity]@0#7](f:0,a:0,s:0) onFrameAvailable the first frame is available Update Preview stream state to STREAMING PreviewView Stream State changed to STREAMING invokeOnPreviewStarted() Storing event with priority=VERY_LOW, name=FIREBASE_ML_SDK for destination cct Upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) is already scheduled. Returning... Initialized TensorFlow Lite runtime. Access denied finding property "ro.mediatek.platform" Created TensorFlow Lite XNNPACK delegate for CPU. Replacing 43 out of 43 node(s) with delegate (TfLiteXNNPackDelegate) node, yielding 1 partitions for the whole graph. Replacing 35 out of 47 node(s) with delegate (TfLiteXNNPackDelegate) node, yielding 23 partitions for the whole graph. I0000 00:00:1725023479.429260 21431 oned_decoder_client.cc:696] barhopper::deep_learning::OnedDecoderClient is created successfully. Storing event with priority=VERY_LOW, name=FIREBASE_ML_SDK for destination cct Upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) is already scheduled. Returning... Storing event with priority=VERY_LOW, name=FIREBASE_ML_SDK for destination cct Upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) is already scheduled. Returning... invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) applyRequestedVisibilityToControl: visible=true, type=statusBars, host=com.app/com.app.MainActivity invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) Storing event with priority=VERY_LOW, name=FIREBASE_ML_SDK for destination cct Upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) is already scheduled. Returning... Storing event with priority=VERY_LOW, name=FIREBASE_ML_SDK for destination cct Upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) is already scheduled. Returning... Storing event with priority=VERY_LOW, name=FIREBASE_ML_SDK for destination cct Upload for context TransportContext(cct, VERY_LOW, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy5nb29nbGVhcGlzLmNvbS92MGNjL2xvZy9iYXRjaD9mb3JtYXQ9anNvbl9wcm90bzNc) is already scheduled. Returning... invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) invokeOnAverageFpsChanged(0.0) ```
Camera Device
Device
Samsung Galaxy A53 5G
VisionCamera Version
4.5.2
Can you reproduce this issue in the VisionCamera Example app?
Yes, I can reproduce the same issue in the Example app here
Additional information