Questions tagged [android-webview]

Part of the Android API. A View that displays web pages. This class is the basis upon which you can roll your own web browser or simply display some online content within your Activity.

A View that displays web pages. This class is the basis upon which you can roll your own web browser or simply display some online content within your Activity. It uses the WebKit rendering engine to display web pages and includes methods to navigate forward and backward through a history, zoom in and out, perform text searches and more.

Apart loading from the web, this component supports loading from assets (location file:///android_asset/, this folder must be called "assets" and be present in the project root) or other arbitrary folder. It also supports JavaScript but it is disabled by default and must be explicitly turned on.

Documentation for WebView.

7462 questions
3
votes
1 answer

What is the total cache size in a WebView in iOS and Android?

Is there a limit to the size of the cache size of WebView? Is there a difference between iOS and Android webviews?
unj2
  • 52,135
  • 87
  • 247
  • 375
3
votes
3 answers

How to communicate between WebView & JavaScript?

I am developing native application. My application have a WebView. I want to log this WebView's component's every action. Which button clicked, which image dragged. After that, I will log those things, I want to store in SQLite. So, I googled and…
Breed Hansen
  • 1,159
  • 5
  • 13
  • 21
3
votes
1 answer

How to scroll to a named anchor in WebView url?

I'm having a compatibility problems opening a locally stored page on a specific named anchor in Android'd WebView. Currently I'm using simply webView.loadUrl("file:///android_asset/page.html#fragment"); which works fine on my 4.1 device but users…
Czechnology
  • 14,832
  • 10
  • 62
  • 88
3
votes
1 answer

Background pre-loading of WebView cache

I'd like to pre-load WebView's cache with a webpage from the internet. This would need to be done asynchronously and hidden as to not disturb other UI interactions. The purpose of the pre-load is to avoid subsequent network calls if the WebView is…
Rob
  • 31
  • 1
  • 3
3
votes
2 answers

Alternative way for communication between WebView and native

I am using WebView and a lot of JavaScript in my native application. If JS side wants to call native functions it's rather smooth using JavaScriptInterface. However, if native wants to call JS function it's not so easy. I've tried two solutions so…
Piotr
  • 1,743
  • 1
  • 26
  • 40
3
votes
4 answers

WebView appears as plain white box after the second time it's been initialised

EDIT: tl;dr: WebView appears as white box, even though I appear to be setting it up correctly, and indeed it does work the first two times, but fails subsequently) EDIT: Video showing the problem in action... I have the following bit of code which…
Matt Fellows
  • 6,512
  • 4
  • 35
  • 57
3
votes
1 answer

Android WebView flicker after calling clearView()

I use a android.webkit.WebView to display some HTML formatted info to the user. Whenever I "page" in my application, I reuse all the graphical elements on screen and just fill them with different content. A WebView will by default increase its size…
Jørgen R
  • 10,568
  • 7
  • 42
  • 59
3
votes
4 answers

webView.canGoBack() not working when using loadDataWithBaseURL()

I have a WebView in my application that displays HTML data downloaded from a webpage. Why do I load the HTML rather than the URL alone? Well, in order for me to allow offline search, I download the HTML data and store it on an SQL database.…
daniel_c05
  • 11,438
  • 17
  • 60
  • 78
3
votes
0 answers

playing embedded base 64 encoded audio in android webview

I am trying to play base64 encoded audio embedded in a HTML page from my webview. It is playing in pc browser but not in android WebView. the html page is shown below.

HTML test …

user1653781
  • 69
  • 1
  • 6
3
votes
0 answers

I'm not able to highlight the text in a webview of speaking text in android

I am using a webview for rendering an epub and I am able to implement text to speech functionality, but i am unable to highlight the text! I tried: public class Epub extends Activity implements OnInitListener, OnUtteranceCompletedListener { …
user1497684
3
votes
1 answer

setAllowUniversalAccessFromFileURLs?

my problem is i run the android app and display error log given below.how to solve it . public class SeoShopTest extends Activity { WebView myWebView; TextView mDisplay; AsyncTask mRegisterTask; String Message; …
crickpatel0024
  • 1,999
  • 6
  • 30
  • 47
3
votes
1 answer

Get HitTestResult for arbitrary point

I'd like to be able to figure out what object is at an arbitrary (x,y) point in a WebView, preferably without causing anything to change on the page. I'm developing an accessibility app for Android where the target of a link needs to be identified…
nneonneo
  • 171,345
  • 36
  • 312
  • 383
3
votes
5 answers

Android Twitter integration - stuck in the sign in page?

I have code from a previous Android app which I successfully integrated with Twitter. I've copied this code over to a new app and changed the callback-url, consumer-key and consumer-secret for my new app. Using the twitter4j library I'm able to get…
Adil Hussain
  • 30,049
  • 21
  • 112
  • 147
3
votes
1 answer

Video not playing in android webview

I am loading html page in asset folder to android webview, the html pages has video. But video not playing, Here i share the code.
Deepa
  • 31
  • 1
  • 3
3
votes
2 answers

Android full justify and auto-hyphenation with Hyphenator.js

I'm trying to fully justify text in Android with auto-hyphenation. I have achieved full justification using a WebView as explained here. I have read a couple of threads on auto-hyphenation in Android, but none of them apply to WebViews. I've tried…
willlma
  • 7,353
  • 2
  • 30
  • 45