This commit is contained in:
Adam Velebil 2023-11-29 16:11:22 +01:00
commit e00244cf66
No known key found for this signature in database
GPG Key ID: C9B1E4A3CBBD2E10

View File

@ -107,17 +107,15 @@ internal class QRScannerView(
} }
private fun requestPermissions(activity: Activity) { private fun requestPermissions(activity: Activity) {
coroutineScope.launch { methodChannel.invokeMethod(
methodChannel.invokeMethod( "beforePermissionsRequest", null
"beforePermissionsRequest", null )
)
ActivityCompat.requestPermissions( ActivityCompat.requestPermissions(
activity, activity,
PERMISSIONS_TO_REQUEST, PERMISSIONS_TO_REQUEST,
PERMISSION_REQUEST_CODE PERMISSION_REQUEST_CODE
) )
}
} }
private val qrScannerView = View.inflate(context, R.layout.qr_scanner_view, null) private val qrScannerView = View.inflate(context, R.layout.qr_scanner_view, null)