Log in or register to post comments

Torch not working on Pixel 3

March 20, 2019 - 12:31pm #8

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;

}

Torch not working on Pixel 3

March 21, 2019 - 10:35am #7

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

Torch not working on Pixel 3

March 22, 2019 - 2:31pm #6

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. 

 

Torch not working on Pixel 3

March 22, 2019 - 3:26pm #5

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

After removing the AAR file this issue was resolved, once I placed it back in the issue reappeared. I need the file actually, because it won't allow me to upload to the play store otherwise. Is there another known workaround? 

Please fix.

Torch not working on Pixel 3

March 26, 2019 - 9:16am #4

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,

Vuforia Engine Support

Torch not working on Pixel 3

March 26, 2019 - 12:37pm #3

Hi, 



As soon as I remove the plugin, it works fine. On Devices that don't support AR Core it works fine with the plugin as well. I am not using the AR core side of things, it is just that we need the plugin (aar file) because Vuforia is not generating the proper manifest. I need it so that I can submit it to the play store. Please see the following error in the link.



https://developer.vuforia.com/forum/unity/play-store-submission-error-comgooglearcore

The other solutions do not work, so I need to add the AAR file.

I don't think ARCore is the root issue. I think its Vuforia, since Vuforia is the one initializing the camera and controlling it.



Please fix either the ARCore dependency issue for the Play Store of fix compatibility with the arcore AAR file.

Torch not working on Pixel 3

March 26, 2019 - 2:25pm #2

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

Torch not working on Pixel 3

March 26, 2019 - 5:11pm #1

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?



https://developer.vuforia.com/forum/unity/play-store-submission-error-comgooglearcore#comment-67550

Log in or register to post comments