Skip to content

Commit

Permalink
Update QR code camera resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
Juliano1612 committed May 15, 2024
1 parent a662199 commit 7cd6ea7
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.spruceid.wallet.sdk.ui

import android.util.Range
import androidx.camera.core.CameraSelector
import androidx.camera.core.ImageAnalysis
import androidx.camera.core.ImageAnalysis.STRATEGY_KEEP_ONLY_LATEST
Expand Down Expand Up @@ -95,7 +96,7 @@ fun QRCodeScanner(
) {
AndroidView(
factory = { context ->
val screenSize = android.util.Size(1280, 720)
val screenSize = android.util.Size(1920, 1080)
val resolutionSelector =
ResolutionSelector
.Builder()
Expand All @@ -108,7 +109,10 @@ fun QRCodeScanner(
.build()
val previewView = PreviewView(context)
val preview =
Preview.Builder().setResolutionSelector(resolutionSelector).build()
Preview.Builder()
.setTargetFrameRate(Range(20, 45))
.setResolutionSelector(resolutionSelector)
.build()
val selector =
CameraSelector.Builder()
.requireLensFacing(CameraSelector.LENS_FACING_BACK)
Expand Down

0 comments on commit 7cd6ea7

Please sign in to comment.