Log in or register to post comments

Turn on Flash as light

October 12, 2015 - 1:57am #1

Is it possible (via vuforia sdk) to turn on and off (at will) the camera flash, to use as constant lighting? 

Turn on Flash as light

May 9, 2018 - 12:20pm #12

ICMSOFT2017 wrote:

AlessandroB wrote:

Yes, the flash can be enabled and disabled at will, and this is also shown in the Image Targets sample.\

You can use this API:

CameraDevice.Instance.SetFlashTorchMode( true / false );

 

 

Perfect Solution!! Thank You :)

how to use??

 

Turn on Flash as light

October 27, 2017 - 1:29pm #11

AlessandroB wrote:

Yes, the flash can be enabled and disabled at will, and this is also shown in the Image Targets sample.\

You can use this API:

CameraDevice.Instance.SetFlashTorchMode( true / false );

 

 

Perfect Solution!! Thank You :)

Turn on Flash as light

October 27, 2017 - 1:28pm #10

Perfect Solution!!  Thank You :)

Turn on Flash as light

September 27, 2017 - 2:47pm #9

Hello naveenahsn,

AlessandroB's post gives the following API call: CameraDevice.Instance.SetFlashTorchMode( true / false ); This function will turn on or off the flashlight depending on whether you pass true or false.

Could you clarify what detailed instructions you are still looking for please?

Thanks,

-Vuforia Support

Turn on Flash as light

September 25, 2017 - 12:55am #8

Can anybody give detailed instructions on this? It helps a lot.

Turn on Flash as light

September 22, 2017 - 1:48pm #7

Do you have any other code calling ToggleLight()? Based on that code alone it would only ever turn the flashlight off. I confirmed that the function CameraDevice.Instance.SetFlashTorchMode correctly enables and disables the flashlight by hooking it up to a button in the sample project.

Thanks,

-Vuforia Support

Turn on Flash as light

September 22, 2017 - 1:01pm #6

I'm trying to toggle the devices flashlight like this (based on AlessandroB's reply):

void Awake () {

  mFlashEnabled = false;

  toggleLight = new UnityAction (ToggleLight);

}

void ToggleLight(){

  if (!mFlashEnabled){

   CameraDevice.Instance.SetFlashTorchMode(true);

   mFlashEnabled = true;

  }

  else{

   CameraDevice.Instance.SetFlashTorchMode(false);

   mFlashEnabled = false;

  }

}

I've tested this in IOS and Android but it does not work on either device. 

Turn on Flash as light

September 21, 2017 - 11:00am #5

Hello sebaslamu,

Are you not seeing this feature working after following the advice given in this thread? If so, please provide additional details on what you are doing in your app.

Thanks,

-Vuforia Support

Turn on Flash as light

September 20, 2017 - 3:25pm #4

Has anyone been able to make this work correctly? 

Turn on Flash as light

October 15, 2015 - 7:03am #3

Yes, the flash can be enabled and disabled at will, and this is also shown in the Image Targets sample.\

You can use this API:

CameraDevice.Instance.SetFlashTorchMode( true / false );

 

Turn on Flash as light

October 14, 2015 - 7:41pm #2

up..

Log in or register to post comments