html2apk Get the app

Can an HTML app use the camera and location?

Yes.

Updated 12 October 2026By HTML2APK Editorial Team
Answer

Yes. Inside an HTML APK, navigator.mediaDevices.getUserMedia() (camera and microphone) and navigator.geolocation work when the app declares the matching Android permission and the user grants it. In HTML2APK's builder you switch these permissions on per app; your JavaScript should still handle the user saying no.

async function startCamera(video) { try { const stream = await navigator.mediaDevices.getUserMedia({ video: { facingMode: 'environment' } }); video.srcObject = stream; await video.play(); } catch (e) { showMessage('Camera access is off. You can turn it on in Settings → Apps.'); } } navigator.geolocation.getCurrentPosition( p => showNear(p.coords.latitude, p.coords.longitude), () => showMessage('Location is off — choose your city instead.'), { enableHighAccuracy: true, timeout: 10000 });

Tips

  • Ask at the moment the feature is used, with a sentence explaining why.
  • Only enable the permissions you use — extra permissions trigger store questions and Play Protect suspicion.
  • Location stops when the app is in the background.

Frequently asked questions

Does QR scanning work in an HTML app?

Yes — a JavaScript QR library reading frames from getUserMedia works, provided the camera permission is enabled for the app.

H2

HTML2APK Editorial Team
Written and checked against the app our builder actually produces. Found an error? Tell us.

Turn your HTML into an APK today

Install the free builder on your Android phone, add your HTML file, ZIP or website, and install a signed APK a few minutes later. No watermark, no card.