this now works on 3/4 of my devices
This commit is contained in:
parent
9f9bc54a85
commit
2e86e0d052
1 changed files with 1 additions and 7 deletions
|
@ -7,7 +7,6 @@ import android.app.Activity
|
|||
import android.content.Context
|
||||
import android.content.pm.PackageManager
|
||||
import android.os.Bundle
|
||||
import android.util.Size
|
||||
import android.webkit.URLUtil
|
||||
import androidx.activity.ComponentActivity
|
||||
import androidx.activity.compose.rememberLauncherForActivityResult
|
||||
|
@ -121,12 +120,7 @@ fun Screen() {
|
|||
preview.setSurfaceProvider(previewView.surfaceProvider)
|
||||
val imageAnalysis = ImageAnalysis.Builder()
|
||||
.setBackpressureStrategy(STRATEGY_KEEP_ONLY_LATEST)
|
||||
.setTargetResolution(
|
||||
Size(
|
||||
640, // previewView.width,
|
||||
480, // previewView.height
|
||||
)
|
||||
).build()
|
||||
.build()
|
||||
imageAnalysis.setAnalyzer(
|
||||
ContextCompat.getMainExecutor(context),
|
||||
QrCodeAnalyzer { result -> code = result })
|
||||
|
|
Reference in a new issue