HTMLtoApphtmltoapp.net Build free
reference

Which JavaScript APIs work in an Android WebView app?

9 min readUpdated 2026-10-05By the HTML to App team

Inside an Android WebView app, standard web APIs work as in Chrome: DOM, canvas, WebGL, WebAssembly, fetch, localStorage, IndexedDB, Web Audio, pointer and device-orientation events. Camera, microphone and geolocation work once the app declares the Android permission. Notifications and Web Push, Web Share, Web Bluetooth, WebUSB, Web NFC, speech recognition, file downloads, PDF display and window.print() are not available.

The table

APIIn the appNotes / workaround
DOM, CSS, canvas, WebGL 1/2, WASMYesSame Chromium as Chrome
fetch, XHR, WebSocketYeshttps only; allow the app origin in CORS
ES modules, dynamic importYesBecause files are served from an https origin
localStorage, IndexedDB, Cache APIYesPrivate to the app, kept across updates
Web Audio, <audio>, <video>YesAudio starts after a user gesture
Pointer, touch, device orientationYesNo permission needed
Clipboard writeYesFrom a tap handler; reading is unreliable
Camera / microphone (getUserMedia)With permissionSwitch on in the builder; handle NotAllowedError
GeolocationWith permissionDeclare on Data safety if positions leave the device
<input type="file">ProOpens the system picker on Pro builds
tel:, mailto:, wa.me, Maps linksProHanded to the phone's apps on Pro builds
navigator.vibrateIgnoredMake haptics optional
Notification API, Web PushNoNative push (Pro, OneSignal)
navigator.shareNoCopy-link button or a wa.me link
Web Bluetooth / USB / NFC / SerialNoNeeds a native app
Speech recognitionNoRecord audio, send to a speech-to-text API
Downloads, blob: links, PDF viewingNoShow content as HTML; PDF.js for documents
window.print()NoDesign a phone-sized HTML receipt instead

Feature-detect, always

const inApp = location.hostname === 'appassets.androidplatform.net'; if ('share' in navigator) { shareBtn.onclick = () => navigator.share({ url: 'https://example.com/item/42' }); } else { shareBtn.textContent = 'Copy link'; shareBtn.onclick = () => navigator.clipboard.writeText('https://example.com/item/42'); }

Note the hard-coded public URL: inside the app, location.href is an appassets address that means nothing to anyone you send it to.

External links

Links to other https sites open inside the app; target="_blank" opens a full-screen pop-up that back closes. Keep external links few — a user reading someone else's page inside your app has no address bar and may not realise they left.

Questions people ask

Does localStorage persist in an Android WebView app?

Yes. It persists across app launches and app updates, and is cleared only on uninstall or when the user clears the app's storage.

Can an HTML app download files?

No; WebView has no download manager. Show the content on screen, copy it to the clipboard, or share a hosted https link.

Does getUserMedia work in an APK?

Yes, once the app declares the camera or microphone permission and the user grants it.

Your HTML is one upload away from an app

Install the free builder, drop in your HTML file or ZIP, and download a signed APK in a few minutes. No watermark, no card, no Android Studio.

Build my APK free