Free tool

WebView Config Generator

Tick what your pages actually use. Get back the manifest permissions, the WebSettings block and the runtime-permission code that make them work.

What does your site need?

Ask for only what you use — every extra permission is one more thing a user can decline and a reviewer can question.

Device features

WebView behaviour

Two layers have to agree before a feature works

A web page asking for the camera inside an Android app has to pass through two separate gates, and people usually only configure one of them:

  1. The Android permission. Your app declares CAMERA in the manifest and asks the user at runtime. Without it, the app has no camera access, full stop.
  2. The WebView permission. Even with the OS permission granted, the WebView asks your code whether this page may use the camera, via onPermissionRequest. The default implementation denies everything.

Miss the second and the symptom is maddening: the app has permission, the page calls getUserMedia(), and nothing happens — no prompt, no error dialog, just a rejected promise. That is the single most common WebView support question, and it is why the code above always generates the client alongside the manifest.

Ask for less than you think you need

Every permission you declare shows up on your Play listing, appears in the install dialog, and needs a justification in the Data Safety form. Location in particular triggers extra scrutiny — and if you declare it and never use it, you have made your listing scarier for no benefit. Declare what your pages actually call, and nothing else.

Web APIAndroid permissionAlso needs
navigator.geolocationACCESS_FINE_LOCATIONonGeolocationPermissionsShowPrompt
getUserMedia({video})CAMERAonPermissionRequest
getUserMedia({audio})RECORD_AUDIOonPermissionRequest
<input type="file">none on modern AndroidonShowFileChooser
Download linksnone on Android 10+setDownloadListener
Web pushPOST_NOTIFICATIONS (Android 13+)a messaging SDK

The settings that decide how your site feels

File upload: the one that needs real code

An <input type="file"> in a plain WebView does nothing at all — tapping it is inert, because the WebView has no idea how to show a file picker. You have to implement onShowFileChooser, launch the intent, and hand the resulting URIs back through the callback. Forgetting the callback on a cancelled picker is a classic bug: the input stays permanently dead until the page reloads, because the WebView is still waiting for a result that never came.

Cleartext traffic

Since Android 9, plain http:// requests are blocked unless you explicitly opt in. Leave the block in place: if your site still serves anything over http, fix the site rather than reopening the door. The one legitimate exception is bundled content served from a local http://localhost server inside the app, which is why the generator adjusts that setting when you tick the offline option.

Frequently asked questions

Why does the camera not work in my Android WebView?

Almost always because onPermissionRequest is not implemented. The default WebChromeClient denies every page request, so even with the CAMERA permission granted to the app, getUserMedia() is rejected with no prompt and no visible error. You need both the OS permission and the WebView callback.

Do I need storage permission for downloads?

Not on Android 10 and above — scoped storage lets DownloadManager write to the Downloads folder without any permission. Only declare WRITE_EXTERNAL_STORAGE with android:maxSdkVersion="28" if you still support Android 9 and older.

Why does file upload do nothing when I tap it?

A WebView has no built-in file picker. Until you implement onShowFileChooser and launch a chooser intent yourself, the input is inert. Remember to invoke the callback even when the user cancels, or the input stays dead until the page reloads.

Should I enable JavaScript and DOM storage?

Both are off by default in a bare WebView and both are needed by essentially every modern site — DOM storage in particular, since localStorage throws without it and takes session or cart logic down with it.

Does the online builder set all this up?

Yes. Its permissions step covers location, camera and microphone, and the generated app already implements the file chooser, download listener, external-link handling and WebView settings. This tool is for people writing the Android project themselves.

Related tools

Ready to turn your site into an app?

Upload an HTML file or a ZIP, set your icon and name, and download a signed Android app. No Android Studio, no command line.

Open the builder