- Home /
I need help turning on the Device's Flash using Vuforia.
I was wondering if anyone could point me in the right direction.
I wish to simply use Vuforia to turn on and off the phone's light, no AR, no live camera feed, nothing, just simply turn on the light.
Using the included AR Camera prefab works fine, but it loads a bunch of behavior I just simply don't need (in my project, that is).
Is there a way of accessing the torch/flash directly? Without having to instance the AR Camera prefab?
I found a similar question to this one, and within the answers, the asker eludes to doing exactly what I am asking, but fails short of disclosing how they achieved this.
Thanks
Answer by BlackPanda · Jun 22, 2014 at 08:40 AM
I don't think you can make the flash work without the ARCamera prefab. But the important thing is, make sure that you make the QCARPlayerNativeActivity in the Android Manifest file in Plugins->Android directory as the main activity. Otherwise there is a chance for the camera flash not to work as expected.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Also include this feature and permission:
<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.CAMERA" />
Your answer
Follow this Question
Related Questions
Cloud recognition in Vuforia 0 Answers
Turn on iPhone torch using ARKit 1 Answer
Find location of rigidbody within model. 0 Answers