"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Torch not working on Pixel 3

Bug Report:  Torch not working on Pixel 3 in Unity. Using version 8.0.10. I have a flashligh f(x) connected to a UI Button. It does work successfully on a S10  and an S7. I've tried waiting for the end of the frame to turn it on and i tried turning it on mid frame. just not working.  Code Implimentation:  using System.Collections;

using System.Collections.Generic; using UnityEngine; using Vuforia;

public class VuforiaFlashlight : MonoBehaviour { private bool isFlashActive = false; private bool isFlashSet = true;

private void LateUpdate() {   if (!isFlashSet)   {    isFlashSet = true;    isFlashActive = !isFlashActive;    if (CameraDevice.Instance.SetFlashTorchMode(isFlashActive))    {     Debug.Log("Flashlight: " + isFlashActive);    }

   else    {     Debug.Log("Flashlight not available.");    }   } }

public void ToggleFlashLight() {    isFlashSet = false;

}

Hello,

For camera controls, Vuforia calls native OS APIs. Does the torch work when you're not running Vuforia on that device? The fact that it works on other devices tells me the SDK is likely doing what it should.

Thanks,

Vuforia Engine Support

It does work otherwise. Just in my app its problematic.
This is now happening on my s10 as well, although i haven't changed that relevant code. 
 

After further review I found the issue. 

The ARCore .aar file breaks the ability for the flashlight to work. Folowed this tutorial. 

https://library.vuforia.com/content/vuforia-library/en/articles/Solution/arcore-with-vuforia.html

Hello,

Sounds like ARCore does not support the torch on these devices. We observed similar with early versions of ARCore not supporting continuous auto-focus.

What about a project without Vuforia that uses ARCore? Does the torch work then?

Thanks,

medabit

Tue, 03/26/2019 - 21:25

In reply to by lwarner

Hello,

I believe this confirms that ARCore does not support torch: https://github.com/google-ar/arcore-android-sdk/issues/153

Thanks,

Vuforia Engine Support

Well then, Thanks for that! :) Hopefully they fix it soon. So can you answer the issue about why I can't deploy a build with vuforia to the Google Play Store without using the .AAR file? My application does not actually need ARCore. Maybe we can move the discussion to the other forum?