Tag: webview

Android webView saveState

I have a tabhost with 3 tabs. In each of these tabs there is a webiview. When i click a tab the webview need to “reload” even when i have been there before, it have not been saved. Is there any way to save the webview ?

Jelly Bean WebView not working well with HTML maxlength attribute for text box

Jelly Bean doesn’t seem to like the maxlength attribute of HTML for text input. It certainly restricts the number of input characters but the moment you attempt to type beyond the allowed number of character, the text box fails. Now you won’t be able to type in any other text boxes and nor will you […]

Android: Intercept AJAX call from WebView

I want a HTML/javascript application, running in a WebView to make AJAX calls that are handled by the Java code. Ideal would be to just intercept the call (easy, just use shouldOverrideUrlLoading()) and ‘return’ some data. However, I don’t find a way to ‘return’ a response to the WebView, other than calling a javascript function […]

'Webpage not available' with WebView.loadData() ONLY in emulator

I’m calling loadData on my WebView and passing it some HTML in the form of a String like so: webView.loadData( htmlString, “text/html”, “utf-8” ); It works fine on my Galaxy Tab 10.1, but the WebView displays: Webpage not available when running on the emulator with everything set up to match my Galaxy Tab. Setting android.permission.INTERNET […]

Android Webview app won't let video player go full screen

Hi I created a webview app for my video site. The design of the site is a hybrid that loads for mobile users. Only videos compatible with mobile devices are loaded onto the hybrid. The players are from Vk, dailymotion, youtube, quicktime. The videos only play on sdk 11 and higher but when I click […]

Filename are missing for openFileChooser Android 4.4.4

Goal: to be able to attach a file of any type to a <input type=”file” /> in a webview in Android 4.1+. (Android 5+ is fine) I set openFileChooser as I saw fit based on few examples I have found. It works on 4.1 but not on 4.4.4 where the files attached do not have […]

Android – Drawing to a PDF canvas from WebView

I’ve been having troubles getting PDF printing work on Android. What I’m trying to do is render some HTML in WebView, then draw the WebView contents on a PDF canvas and finally write the PDF to a file. The problem I’m having is that when I draw to the PDF canvas the content gets clipped […]

Android WebView – Setting HTML Field focus using Javascript

I have an application with just a visible WebView component to it which is used to display some dynamically generated HTML (can run Javascript too). It’s enabled for the WebView. For a few pages I am trying to set the focus of one of the input text boxes after the page load has finished – […]

Android browser cuts the https:// scheme from complete qualifier

In my app, I show an external HTML site in either a CustomTabsIntent or a in a WebView: if (customTabsIntent != null) customTabsIntent.launchUrl(this, Uri.parse(“http://some.where.com/site.html”)); else startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(“http://some.where.com/site.html”))); But the style of that HTML is already updated, but my smartphone shows the old style (old fonts etc.). In the *.html file there is a *.css […]

Detect android webview URL location change

Does anyone else know how to track a sort of webview “onLocationChange”? iOS has something like this for its webview. PS – I am trying to see if I can use the phonegap childbrowser plugin on android to do facebook auth. I’m giving up and just using a facebook plugin I found that uses part […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.