22,485 questions
303
votes
8
answers
194k
views
Android webview & localStorage
I have a problem with a webview which may access to the localStorage by an HTML5 app. The test.html file informs me that local
storage is'nt supported by my browser (ie. the webview). If you have any ...
293
votes
8
answers
362k
views
Android Calling JavaScript functions in WebView
I am trying to call some javascript functions sitting in an html page running inside an android webview. Pretty simple what the code tries to do below - from the android app, call a javascript ...
262
votes
7
answers
261k
views
Android Webview gives net::ERR_CACHE_MISS message
2023 Edit: This question was from 2015. You may be able to find more suitable answers elsewhere.
I built a web app and wants to create an android app that has a webview that shows my web app. After ...
221
votes
7
answers
153k
views
How to check if a file exists in Documents folder?
I have an application with In-App Purchase, that when the user buy something, download one html file into the Documents folder of my app.
Now I must check if this HTML file exists, so if true, load ...
214
votes
23
answers
308k
views
File Upload in WebView
I have been struggling to upload files from WebView. I googled and implemented all suggested solutions (e.g. this SO post), but none work.
I have an HTML page with the following code to upload a file.
...
191
votes
11
answers
193k
views
Android webview slow
My android webviews are slow. This is on everything from phones to 3.0+ tablets with more than adequate specs
I know that webviews are supposed to be "limited" but I see web apps done with phone gap ...
190
votes
7
answers
396k
views
jQuery get the location of an element relative to window
Given an HTML DOM ID, how to get an element's position relative to the window in JavaScript/JQuery? This is not the same as relative to the document nor offset parent since the element may be inside ...
187
votes
11
answers
158k
views
Swift Open Link in Safari
I am currently opening the link in my app in a WebView, but I'm looking for an option to open the link in Safari instead.
178
votes
6
answers
145k
views
Is `shouldOverrideUrlLoading` really deprecated? What can I use instead?
Is "shouldOverrideUrlLoading" really deprecated? If so, what can I use instead?
It seems like shouldOverrideUrlLoading is deprecated targeting Android N and I need to make an app work since API 19 ...
175
votes
23
answers
143k
views
Android WebView style background-color:transparent ignored on android 2.2
I'm struggling to create a WebView with transparent background.
webView.setBackgroundColor(0x00FFFFFF);
webView.setBackgroundDrawable(myDrawable);
Then I load a html page with
<body style="...
170
votes
5
answers
181k
views
How to pass html string to webview on android?
I am parsing xml and then loading it to web view. After parsing, I am creating four strings so that I could append all strings to one view. I am able to get two views on the web view, but not the ...
155
votes
6
answers
134k
views
How to enable zoom controls and pinch zoom in a WebView?
The default Browser app for Android shows zoom controls when you're scrolling and also allows for pinch zooming. How can I enable this feature for my own Webview?
I've tried:
webSettings....
155
votes
20
answers
110k
views
Android WebView: handling orientation changes
The issue is the performance following rotation. The WebView has to reload the page, which can be a bit tedious.
What's the best way of handling an orientation change without reloading the page from ...
152
votes
21
answers
55k
views
android.view.InflateException Error inflating class android.webkit.WebView
In Lollipop (API 22) every time in my application I show a webview the application crashes.
I have multiple crashes in my android developer console related to this event.
No need to say that it works ...
147
votes
14
answers
266k
views
how to get html content from a webview?
Which is the simplest method to get html code from a webview?
I have tried several methods from stackoverflow and google, but can't find an exact method. Please mention an exact way.
public class ...