# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://thirdeyegen.gitbook.io/developer-portal/android-development/flashlight-torch-control-during-video-capture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
