[Solved] QCamera iOS
-
Hello,
I'm working on iOS (and Android) Widget base application and I run into strange problem (here is one of them, because Camera support for embedded is minefields).Situation: code contains only QCamera and QVideoWidget to display image from camera.
When application is run on iOS access to "Camera" is asked - that's natural, but just after that access to the "Microphone" is asked.
That's not really a problem but it becomes a problem when dev. wants to put application into AppStore - app review will most likely reject (and they do) because application request access to the device and don't use that device.
Now question - AFAIKT non of QCamera nor QVideoWidget has any option related (at least directly) to the Microphone / sound - so how to remove this permission request?
I have test project on my mac but code looks more or less like this:
QCamera* cam = new QCamera( QCamera::FrontFace, this); cam->setViewfinder( videoWidget); // QVideoWidget added earlier into layout cam->load(); cam->start();
Thanks for help.
Best regardsUpdate: This issues is recognized as Qt bug and is already fixed (should be available in Qt 5.4.2 and 5.5++).
-
Hi,
Android:
In yourAndroidManifest.xml
, there should be a<!-- %%INSERT_PERMISSIONS -->
comment. Replace this by<uses-permission android:name="android.permission.CAMERA" />
. This should do the trick, but I can't test it right now.iOS:
Don't know. -
Thanks for the reply.
I should be more specific, my bad.
Minimum Qt that I need to use is Qt 5.4.1. Os iOS - something around 6.Situation QCamera class on embedded is badly broken
Android - it doesn't work at all in current Qt version - issue started around version Qt 5.0 - 5.1, maybe earlier and is not fixed including current version
iOS - QCamera do work - but when QCamera object is created access to the Camera (that's ok) and Microphone (that's not ok) is asked. When application is submitted to the AppStore it will be rejected if application don't use Microphone.I'm now just wondering if someone stumbled upon this problem and found workaround because obviously proper fix is modifying qpa for QCamera.