diff --git a/pretixdroid/app/src/main/java/eu/pretix/pretixdroid/ui/MainActivity.java b/pretixdroid/app/src/main/java/eu/pretix/pretixdroid/ui/MainActivity.java index eefd0a8..1ec6c05 100644 --- a/pretixdroid/app/src/main/java/eu/pretix/pretixdroid/ui/MainActivity.java +++ b/pretixdroid/app/src/main/java/eu/pretix/pretixdroid/ui/MainActivity.java @@ -217,8 +217,10 @@ public void onResume() { super.onResume(); if (config.getCamera()) { qrView.setResultHandler(this); - qrView.startCamera(); qrView.setAutoFocus(config.getAutofocus()); + if (ContextCompat.checkSelfPermission(this, Manifest.permission.CAMERA) == PackageManager.PERMISSION_GRANTED) { + qrView.startCamera(); + } resetView(); } else { // Broadcast sent by Lecom or Zebra scanners