zxing-android-embedded icon indicating copy to clipboard operation
zxing-android-embedded copied to clipboard

android.permission.CAMERA in Manifest force other camera access to manage rights

Open jeremart opened this issue 5 years ago • 1 comments

Description of the problem:

Let me explain a little bit more. I build an App which needs to take picture from the camera via startActivityForResult method with a new Intent(MediaStore.ACTION_IMAGE_CAPTURE). For this I don't need to add in my manifest (just ). It worked well until I added dependency on com.journeyapps:zxing-android-embedded. From now, if I don't use the scan feature (from com.journeyapps:zxing-android-embedded IntentIntegrator.initiateScan()) at first, and so don't agree to allow the rights on my camera, I can't take picture as before because I have to ask for rights on runtime. I'm pretty sure it's due to the set into the AndroidManifest.xml file. From my point of view this permission is not mandatory in the Manifest file and could be removed to not interfere with other app features.

Which library version are you using? E.g. 3.2.0. com.journeyapps:zxing-android-embedded:3.4.0, but still the issue on 4.1.0

Which phone/tablet are you using, and which Android version does it run? (e.g. Samsung Galaxy S5, Android 5.0)

  • Huawei P8Lite 2017 Android 8.0 (physical device)
  • Nexus S API 22 (Emulator)
  • Pixel XL API R (Emulator)

Does the same happen on other devices or an emulator? Yes

Can you reproduce the issue in the sample project included with the library? If not, can you provide your own sample project or sample code that produces this error?

In the case of an error do you have a stack trace or adb logs?

jeremart avatar May 11 '20 09:05 jeremart

Same here

xuanrljp avatar Feb 24 '23 12:02 xuanrljp