Skip to content
WebViewGold Vibe Coding to App Store
English
Get WebViewGold

Base44 + flashlight

Flashlight control for your Base44 app

Reading a serial number in a dark storeroom, checking a meter in a basement, finding a seat at a concert: sometimes your Base44 app just needs light. WebViewGold switches the phone's torch on and off from two links, enableflashlight:// and disableflashlight://, on iOS and Android. It is a small feature that works best as a helper inside a bigger workflow.

From $109 one-time per platform, or let our team do it all from $698.

  • Approval guarantee – or money back within 14 days
  • No coding needed
  • One-time payment, free updates
  • 24/7 human support
  • Made in Germany since 2014 · ISO 27001

Where a light button earns its place

Scanner and inventory apps

A light toggle next to the scan button helps users read labels, serial numbers and meters in warehouses, cellars and parking garages. Test on your devices whether the light stays on while the native scanner camera is open.

Field, outdoor and event apps

Inspection checklists for technicians, hiking and camping guides, staff checking tickets at a dark entrance. The light sits on the screen where the work happens.

Accessibility helpers

A large, clearly labeled light button for users who need light to read a menu, a sign or a printed document. The WebViewGold docs list accessibility as a use case.

Games and scavenger hunts

Light as a signal or reward in a quiz, escape-room or scavenger-hunt app. Keep effects slow; rapid flashing is uncomfortable and can be risky for photosensitive users.

Prompt for Base44

Paste this into Base44 to implement the web-app side. Review the result, publish, then test inside the WebViewGold app.

Prompt to paste into Base44
Add a flashlight button for our WebViewGold mobile app. 1) On the Inspection page, next to the Take photo button, add a Light toggle. 2) Show it only when navigator.userAgent contains my custom WebViewGold token; in normal browsers it is hidden. 3) Tapping it switches between on and off: on navigates to enableflashlight://, off navigates to disableflashlight://. The button text shows Light on or Light off. 4) Turn the light off automatically when the user leaves the page or after three minutes. 5) Make the button large and high-contrast for use outdoors. 6) Do not save anything about the light in the database.

My iOS WebView is finally approved. Thanks!!

Taha Farooqui · CodeCanyon

Add a light toggle to your web app

About 15 minutes.

  1. Add one toggle with a clear state

    Inside the app it navigates to enableflashlight:// or disableflashlight://. In a browser, hide it: websites cannot switch the flashlight reliably across browsers.

  2. Detect the app

    Set a custom user agent containing a token such as WebViewGold (useragent_iphone and useragent_ipad in Config.swift, USER_AGENT in Config.java) and show the button only when it is present. A distinct iPad user agent lets you hide it on iPads without a flash.

  3. Remember the state yourself

    The docs describe on and off commands, not a status read-back. Keep the state in the web app and reset the label when the page loads.

  4. Turn it off when the user leaves

    Call disableflashlight:// when the user leaves the screen, so the light does not drain the battery in a pocket. On iOS, trigger one bridge call per tap rather than several in the same script.

  5. Check the permissions

    The docs ask for the camera permission entries (Info.plist on iOS, AndroidManifest.xml on Android), because the torch is part of the camera hardware. On iOS, kFlashLightEnabled in Config.swift must not be false, or the calls are blocked.

A toggle that hides itself in the browser

Pure front-end code; nothing in your backend changes.

javascript
// Custom user agent containing "WebViewGold" set in Config.swift / Config.java
var IN_APP = navigator.userAgent.indexOf("WebViewGold") !== -1;
var lightOn = false;

function initLightButton(btn) {
  if (!IN_APP) { btn.hidden = true; return; }   // browsers: no torch control
  btn.addEventListener("click", function () {
    lightOn = !lightOn;
    window.location.href = lightOn ? "enableflashlight://" : "disableflashlight://";
    btn.textContent = lightOn ? "Light off" : "Light on";
    btn.setAttribute("aria-pressed", String(lightOn));
  });
}

// call when the user leaves the screen (route change)
function lightOffOnLeave() {
  if (IN_APP && lightOn) { lightOn = false; window.location.href = "disableflashlight://"; }
}

Store review: what to expect

  • Apple Guideline 4.3(b) names flashlight apps among well-established categories: new ones are not accepted unless they offer a meaningfully different experience. Ship the light as a helper inside a real workflow, never as the main feature. See Guideline 4.3 explained.
  • Write a specific camera purpose string ("to turn on the flashlight while you scan labels"), not a generic sentence. See permissions and purpose strings.
  • If the app uses the camera for nothing else, tell the reviewer in the review notes where the light button is, so the camera permission does not look unused.
  • Avoid strobe or SOS blink effects with fast intervals. They can trigger photosensitive reactions and look like a gimmick in review.

Frequently asked questions

Can a website turn on the flashlight?

Not reliably across browsers. Inside a WebViewGold app, enableflashlight:// and disableflashlight:// switch the torch on iOS and Android.

Will Apple accept an app whose main feature is a flashlight?

Very unlikely. Guideline 4.3(b) lists flashlight apps among well-established categories that need a meaningfully different experience. As one helper inside a scanner, inventory or field-service app, the light is no problem.

Why do I need a camera permission for the light?

The torch is part of the camera hardware, and the WebViewGold docs ask for the camera permission entries in Info.plist and AndroidManifest.xml. Write the purpose string so it mentions the light.

Can my Base44 app read whether the light is on?

The docs describe only the on and off commands. Keep the state in the web app and switch the light off when the user leaves the screen.

Does the flashlight work on iPad?

Only on iPad models with a rear flash; many iPads have none. Give iPads their own user agent (useragent_ipad) and hide the button there, or show a friendly message.

Three ways to get your app into the stores

Same result, different amount of work on your side. All three come with the approval guarantee and 24/7 human support.

Do it yourself

$109 per platform, one-time

The WebViewGold license: a finished Xcode or Android Studio project. Paste your URL, set name and icon, switch on features, build and submit. Free updates forever.

See plans on the main page

Cloud Builder

$349 per license, one-time add-on

No Mac, no Xcode, no Android Studio: configure in the browser, we build both apps in the cloud and hand them to App Store Connect and the Play Console.

How the Cloud Builder works Try the free demo

Full Service

$698 per platform $798

Send us your URL and icon. Our team configures, builds and delivers your app within 72 hours, white-label, with source projects. Both platforms for $1,158.

Full Service details Powered by WeSetupYourWebViewApp

Winter Sale prices valid until December 31, 2026.

Ready to ship your Base44 app?

App Store & Google Play approval guarantee – or your money back within 14 days

Rather hand it over? Full Service: we configure, build and deliver within 72 hours, from $698 per platform. Questions? Chat with us 24/7.

Refunds are granted under the conditions listed in our FAQ: a non-content rejection by Apple and/or Google, claimed within 14 days after purchase.