Flashlight API
Control the device flashlight from your web app with simple JavaScript links in WebViewGold for Android.
Last updated:
The Flashlight API of WebViewGold allows your website to control the device's flashlight (torch). This feature can be useful for:
- Building utility apps that require the flashlight toggle
- Upgrading user experience during app usage with gamification
- Providing additional accessibility features
How to Use
You can trigger the flashlight on or off directly from your HTML content using the following links:
<a href="enableflashlight://">Turn On Flashlight</a> <a href="disableflashlight://">Turn Off Flashlight</a>
Note: Make sure your app has the required camera permissions in AndroidManifest.xml, as the flashlight functionality is tied to the device's camera hardware.