Unsolved How to mute QML camera
-
@SGaist
Yes but I want to write code -
Well, that's the thing: OS level settings like that can usually not be modified by code.
You should check your target platform documentation for such use case.
-
@SGaist
I have also one problem, I use timer and every 4 seconds it takes photos, but sometimes my screen becomes black, is this qml bug? -
I don't know. You don't give any details that may help answer your question like:
- Target platform where that happens
- Qt version
- Code snippet that you use for that
- etc.
-
@SGaist
platform is Lenovo A319 android version 4.4.2
QT 5.8.0Timer
{
id: tim
interval: 2000; running: true; repeat: true
onTriggered:
{
if (camera.lockStatus === Camera.Locked)
{
camera.imageCapture.capture()
camera.unlock()
}
else
camera.searchAndLock()
}
} -
In your code you are taking photos at 2 seconds interval not 4. Are you sure your device can sustain that speed ? You also have to take into account that each image is saved on your device.
-
@SGaist
no no, after 2 seconds "if" operator is false and it doesn't take photos -
Good point, I've somehow missed the unlock call.
Did you check the state of your phone storage ?
-
@SGaist
when photo is taken, I use it for something and remove from default location -
Did you check the time that it takes to do that ?