I want to know how can I turn on/off the flashlight from the device camera, using a button.
I use this code, but it isn't work:
camera = Camera.open();
Parameters p = camera.getParameters();
PD: Extra question, Why when I have my wikitude app in background, I can't open the Native Camera app?
about 9 years ago
Hi Sergio, Do you know that you can activate the flashlight with a JS API that we have introduced with the SDK 4.0?
I talked with our Android developer and he told me that you need to call the activity life cycle methods like onCreate, onPostCreate, ... on your ArchiteView object. You can find a example on what you need to do exactly in the AbstractArchitectCamActivity.java.
Turns the device flashlight on or off. Use the isFlashlightAvailable property to check if the device has a flashlight or not. If the device has no flashlight and the property is set to true, this will have no effect.
true if the device has a flashlight, false otherwise.
Note that the following permissions are required on Android: