Android Question Why Mic permission for using a Camera?

udg

Expert
Licensed User
Longtime User
Hi all,

title says it all. Downloading this demo code, on first run (when I click on the photo icon) I'm asked to give permission for the Mic, in addition to those for Camera and Memory already set.
I understand that the request is coming from the Camera app which the intent calls, but why this kind of permission should be mandatory in order to take a photo?
If I negate my consent, the camera doesn't start (doesn't show any preview) otherwise everything works as expected.

This happens on a Samsung A40, so it's likely to be the case only for those models that installed that specific Camera app.

Should I give the consent and activate some code to mute the mic? Any other countermeasure?

udg
 

agraham

Expert
Licensed User
Longtime User
kind of permission should be mandatory in order to take a photo?
As the Camera app can also take videos it needs that permission to record the sound. It is probably written a bit stupidly to always need the permission, I doubt that there is any malintent.
 
  • Like
Reactions: udg
Upvote 0

udg

Expert
Licensed User
Longtime User
Right, I didn't consider the taking videos functionality..
I was thinking solely about the lines of a QrCode reader/decoder, so videos were out of my sight :)

BTW; will your excellent QRCodeReaderV102 work as is with B4XPages?

Portability to iOS is not a concern for now.

Edit: ooops, broken the gold rule "one thread, one topic" ... let's hope it passes unobserved.. eheh
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
let's hope it passes unobserved..
No. :p

You are right about creating a new thread for a new issue :D

You are probably not right about the LibraryAuthor.
Do you mean @Johan Schoeman Library?
 
Upvote 0

udg

Expert
Licensed User
Longtime User
WOW, two mistakes with just one post..I'm getting old...
This is what happens when you impose yourself not to take your daily coffees...

Sorry Johan. Sorry everybody.

Now it's lunch time for me..and maybe a coffe soon after the meal..who knows? :)
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
title says it all. Downloading this demo code, on first run (when I click on the photo icon) I'm asked to give permission for the Mic, in addition to those for Camera and Memory already set.
I understand that the request is coming from the Camera app which the intent calls, but why this kind of permission should be mandatory in order to take a photo?
If I negate my consent, the camera doesn't start (doesn't show any preview) otherwise everything works as expected.

This happens on a Samsung A40, so it's likely to be the case only for those models that installed that specific Camera app.
I don't think that this is a serious issue. You can expect that 99% of the users already allowed the camera app to have the required permissions.
One of the main reasons to use the intent based solution is to avoid asking for the permissions yourself.
 
Upvote 0

udg

Expert
Licensed User
Longtime User
You're right and @agraham gave a more than plausible reason for it. It's just that I personally dislike apps that ask more permissions they really need (similar to desktop tools that pretends to use the Internet for whatever are their obscure reasons).
Anyway, in this case it's all ok.

BTW; will your excellent QRCodeReaderV102 work as is with B4XPages?

Let me reply to myself (for those who in the feature will happen to read this thread):
Yes, @Johan Schoeman 's great QRCodeReader102 works with B4xPages. Since a page is a class, the only issue is to initialize like this
B4X:
nativeMe = Me                       'YES
'nativeMe.InitializeContext     'NO
instead of referencing the context (as you will do for an Activity).

I know there are alternatives, but that library covers well my current needs.
 
Upvote 0
Top