Guides
WebView File Upload Not Working? Camera, Location and Mic Fixes
Your upload button works in Chrome and does nothing in your app. That is Android's default, not a bug in your site. Here is what WebView blocks until the app handles it, and how to test before you publish.
If WebView file upload is not working in your app, the cause is almost always Android's defaults, not your website. Android's WebView cancels every file-picker request, denies camera and microphone requests, and refuses location on non-HTTPS pages, unless the app wrapping your site explicitly handles each one. A site that uploads photos perfectly in Chrome can therefore do nothing at all inside an app until the app's code deals with it.
Why is WebView file upload not working in my app?
In Chrome, the browser itself shows the file picker, the camera prompt and the location prompt. In an Android app built from a website, the page sits inside a component called WebView, and the app has to supply those screens. Android's documentation for the file-chooser callback is blunt about it: "The default behavior is that WebView will cancel all file requests." To show a picker, the app must override the callback, return true, and later hand back the chosen file's URI (source: WebChromeClient reference).
The symptom is quiet. You tap Choose file, nothing opens, and no error appears on screen. That is why this problem is hard to search for: the failure looks like a dead button.
File input, no handler
Cancelled
WebView default for file requests
Camera or mic request, no handler
Denied
If onPermissionRequest isn't overridden
Location on http:// pages
Auto-denied
Apps targeting Android 7+
System photo picker
Android 11+
Backport to Android 4.4-10
What does WebView block by default?
Three web features cause most of the support threads on developer forums. The table shows what Android's documentation says happens by default and what the app has to do about it.
| Web feature | Default in WebView | What the app must do |
|---|---|---|
| Upload via <input type="file"> | All file requests are cancelled | Override onShowFileChooser, return true, show a picker, pass the chosen URI back (or null to cancel) |
| Camera or microphone (getUserMedia) | Denied when onPermissionRequest isn't overridden | Override onPermissionRequest and call grant() or deny() for each request |
| Geolocation | Only asked for on secure origins such as https; non-secure origins are automatically denied | Override onGeolocationPermissionsShowPrompt and set the permission state for the origin |
Two things follow from this. First, the fix lives in the app, not in your website's code, so no amount of editing your upload form will help. Second, location on a page served over plain http:// can never work in an app targeting a modern Android version, so check that every page uses https.
How do uploads work once the app handles them?
The file-chooser callback also tells the app what the page asked for: one file or many, and which file types. Android's documentation says apps should check the request's accept types so the picker can filter, for example to images only. A form that accepts only images should therefore open an image-filtered picker, and a form that accepts PDFs should not offer photos.
For photos and videos, Android recommends its system photo picker. It lets people choose specific items and gives the app access to only those, instead of the whole library. It is built into Android 11 and higher on devices that receive Google's system updates, with a backport covering Android 4.4 through 10 (source: Android photo picker guide).
Does Google Play restrict photo and video access?
Yes, and it is the trap for apps that fix uploads the wrong way. Under Google Play's photo and video permissions policy, apps targeting Android 13 or higher may request READ_MEDIA_IMAGES or READ_MEDIA_VIDEO only when system pickers are not sufficient for core functionality, such as a gallery app. Apps that don't qualify must remove those permissions from their manifest, and apps that do qualify must submit a declaration in Play Console. Full compliance became mandatory on May 28, 2025, and non-compliant apps can be removed (source: Play Console Help).
For a website wrapped in an app, a form that uploads a profile picture is not core functionality in that sense. A picker-based upload is the safer design, and it avoids a policy question during review. If your app is already being sent back, see our guide to why Google Play rejects WebView apps.
How do I test uploads, camera and location before I publish?
- 1
List every feature your site uses
Search your site for file inputs, camera or scanner features, video calls, voice recording and any map or store-locator that asks for location.
- 2
Install the app on a real phone
Use a physical device, not just a desktop browser's mobile view, because the browser's picker and prompts are exactly what the app lacks.
- 3
Tap every upload button
Confirm a picker opens, that it filters to the right file types, and that the file actually reaches your server.
- 4
Test the cancel path
Open the picker, back out, then tap upload again. Android's docs require the app to resolve the request even on cancel, and a stuck request is a common cause of buttons that work once and then die.
- 5
Check camera, microphone and location prompts
Each should either show a permission prompt or fail with a clear message, never silently.
- 6
Repeat on an older Android version
Pickers and permission screens differ across versions, so test on at least one device that is a few years old.
If a feature cannot work in the app, make the page degrade honestly. For example, show a plain message such as "Photo upload isn't available in this app yet, use our website" instead of a dead button. Our guide to optimizing a website for a WebView app covers other mobile fixes worth making at the same time.
What should I ask a website-to-app builder about uploads?
- Does the app open a file picker when my page uses a file input, and does it respect the accepted file types?
- Does it handle camera and microphone requests from the page, or deny them?
- Does the Android manifest ask for broad media permissions that Google Play may question?
- Is there a way to test on a real device before paying?
Sign-in is the other common blocker in wrapped apps, and it has a different cause: Google refuses to show its login page inside embedded WebViews, which produces Error 403: disallowed_useragent. It is worth testing alongside uploads.
Frequently asked questions
- Why does my file upload button do nothing in my Android app?
- Android's WebView cancels all file requests by default. The app has to override the file-chooser callback, show a picker and return the selected file. Your website code is usually fine; the wrapper app is missing that handler.
- Why does the camera work in Chrome but not in my WebView app?
- If the app doesn't override onPermissionRequest, Android's documentation says the permission is denied. The app must explicitly grant or deny each camera or microphone request coming from the page.
- Why does geolocation not work in my WebView app?
- For apps targeting Android 7 and later, location requests from non-secure origins such as http:// are automatically denied. Serve every page over https, and make sure the app handles the geolocation permission prompt.
- Does Google Play allow READ_MEDIA_IMAGES in a website app?
- Only for apps whose core functionality can't be met by system pickers, such as gallery apps. Most website-based apps should use the system photo picker and leave those permissions out of the manifest, per Google Play's photo and video permissions policy.
- Will fixing upload problems get my app approved on Google Play?
- Not by itself. Review looks at whether the app offers more than a website in a frame, whether logins work and whether permissions are justified. Working core features such as uploads make a rejection less likely but don't guarantee approval.