> For the complete documentation index, see [llms.txt](https://thirdeyegen.gitbook.io/developer-portal/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://thirdeyegen.gitbook.io/developer-portal/android-development/flashlight-torch-control-during-video-capture.md).

# Flashlight/torch control during video capture

Toggling the Flashlight/Torch during the operation of the camera has known issue with returning the proper enable/disable states. ThirdEye has built an .aar library as a secondary approach to checking the flash state.

All that needed is to add the .aar lib as a dependency and then you can control the torch outside of the normal Android way.

Usages:

`torch = new TorchNativeLib(); if(torch.isTorchEnabled()){ Log.e(TAG, "Torch is enabled"); }else{ Log.e(TAG, "Torch is disabled"); }`

or

`if(torch.isTorchEnabled() == false){ torch.Enable(); StatusText.setText("Torch Enabled");`

`}else{ torch.Disable(); StatusText.setText("Torch Disabled");`

`}`&#x20;

A public git project has been created containing the library and and a set of example code.
