🖌️
Developer Portal
  • ThirdEye Gen Developer Portal
  • Android Studio Development
    • Getting Started In Android Studio
    • Build Your First App in Java
    • Developer Guidelines
    • Integrating Voice Commands
    • Configuring audio with WebRTC
    • Flashlight/torch control during video capture
  • VisionEye SLAM Developement
    • Getting Started in Unity
    • ThirdEye Alpha1 Unity Development
  • General
    • OTA Update Instructions
Powered by GitBook
On this page

Was this helpful?

  1. Android Studio Development

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");

}

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

PreviousConfiguring audio with WebRTCNextGetting Started in Unity

Last updated 2 years ago

Was this helpful?