Tag: webview

Webview text selection not clearing

I have implemented an ActionMode.Callback for custom text selection functions within a WebView. The problem that I am having is that the selection and the action mode states do not match. When I long-press, everything starts out just fine. When I interact with one of the buttons, or the WebView (excluding the actual selection) then […]

On Android webview when i execute javascript the sotfkeyboard disappear

In WebView when I execute a JavaScript through webview.loadUrl(), the softkeyboard disappears if it is visible. When I try to type some text in html text field, the softkeyboard disappears (if JavaScript is executed) and I’m unable to type the all text. The text field does not lose focus, so the prompt is still on […]

External HTML asset not bundled by React Native in production build for use by Webview

I’m building an Android application using React Native. It has a webview that reads an HTML file locally. This is the piece of code I’m using to render webview. <WebView ref=”webview” source={require(‘./helloworld.html’)} javaScriptEnabled style={styles.webView} /> This works well during development build. The HTML file loads on the webview and renders well. But it doesn’t on […]

Android webview loadurl(“file:///android_asset/index.html#home”) failed

I am working on an application in Android, where I want to load a local html file using webview.loadurl(“file:///android_asset/index.html#home”); It will load ok on most devices, but on some Samsung devices with Android OS 4.0.4 , it load fails. Do you have ideas with this issue? Add some comments and sorry for my mistake just […]

Android 4.0 ICS Webview with “Unknown chromium error: -324”

I coding a Browser use WebView in Android 4.0 ICS. But when I access some website,a error occurred. I Override the onReceivedError method in WebViewClient, and I print the logcat. 08-28 09:22:00.549: D/chromium(22081): Unknown chromium error: -324 08-28 09:22:32.658: E/sky-mobi(22081): errorCode:-1 description:A network error occurred。failingUrl: 08-28 09:22:32.705: W/Web Console(22081): The page at “” displayed insecure […]

How to load an image stored in a byte array to WebView?

everyone! I have compressed lots of pictures to a “pictures.zip” file. I want to load one of these pictures to a WebView like this: WebView wv = (WebView)findViewById(R.id.WebView01); wv.loadDataWithBaseURL(null,”<img src=\”abc.jpg\”>”, “text/html”, “UTF-8″, null); Here,”abc.jpg” is a picture that has been compressed to pictures.zip file. I just want to decompress the picture from the zip file […]

Webview with JavaScript interface

I am building a mobile application which should be interacted from java to javascript. I found the solution in this link Passing an array of values from Android Activity to JavaScript in a WebView. But my problem is when i declare webview its showing error like None of the methods in the added interface have […]

Communication between webview and native code in a mobile app

I have to develop an e-commerce mobile app. In order to show the products into the app, I have to use a webview that point to a mobile web site. Associate to each product there is the “add to basket” button. Also this button is an element of the mobile site. In the tab bar […]

Android: How to check for successful load of url when using webview.loadUrl

In webview android I am trying to load a url and in order to check if the load of this url is done successfully (internet connection was available, the server was up etc) I was under the impression that webview.loadUrl would throw exceptions, but wrong! as it explicitly is stated in here “an exception will […]

How to enable Addressbar in Android WebView?

I´m actually using a WebView in my Application and it works pretty good. Now I´d like to be able to change the actual URL, just like that Addressbar in the Android Stock browser, where you can see the URL and where you simply can change it. How can I enable this bar? Or do I […]

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