Menu
  • HOME
  • TAGS

WebView clicking on link results in about:blank

java,android,webview

I just fixed it with this post here @Override public void onPageFinished(WebView view, String url) { System.out.println("onPageFinished: " + url); if ("about:blank".equals(url) && view.getTag() != null) { view.loadUrl(view.getTag().toString()); } else { view.setTag(url); } } ...

WKWebView didn't finish loading, when didFinishNavigation is called - Bug in WKWebView?

ios,objective-c,swift,webview

WKWebView doesn't use delegation to let you know when content loading is complete (that's why you can't find any delegate method that suits your purpose). The way to know whether a WKWebView is still loading is to use KVO (key-value observing) to watch its loading property. In this way, you...

Inject javascript file to my site with webview in android

javascript,android,webview,webkit

Add a new method to inject javascript file. private void injectJS() { try { InputStream inputStream = getAssets().open("jscript.js"); byte[] buffer = new byte[inputStream.available()]; inputStream.read(buffer); inputStream.close(); String encoded = Base64.encodeToString(buffer, Base64.NO_WRAP); webView.loadUrl("javascript:(function() {" + "var parent = document.getElementsByTagName('head').item(0);" + "var script = document.createElement('script');" + "script.type = 'text/javascript';" + "script.innerHTML = window.atob('"...

Webview events not fired

ios,webview,titanium,titanium-alloy

The answer is the willHandleTouches webview property set to false. From the official documentation: Explicitly specifies if this web view handles touches. On the iOS platform, if this web view or any of its parent views have touch listeners, the Titanium component intercepts all touch events. This prevents the user...

Hide Toolbar with CoordinationLayout and Webview not working

android,webview,toolbar

You need to add layout_behavior in webview <android.support.v4.widget.NestedScrollView android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior"> <WebView android:id="@+id/webview" android:layout_width="match_parent" android:layout_height="match_parent" /> </android.support.v4.widget.NestedScrollView> ...

How to call a Javascript method in iOS?

javascript,html,ios,webview

In your code,this is the order that things happen: You load the request in viewDidload Your webview finished load.So you get the value selected.But at this time.You have not select anything. When you select a item, you did not do anything to tell iOS that you select one So,what I...

How can i center the content of a WebView?

java,android,html,css,webview

.element { position: relative; top: 50%; transform: translateY(-50%); } ...

Fragment with Webview utilize harware back button to go to previous webpage

android,android-fragments,webview

Try overriding onBackPressed() in your Activity and make it poke the WebView. BTW - you could post the piece of Activity containing the onKeyDown method as well. EDIT: Instead of making your methods static and accessing them the way you do now (BlogFragment.canGoBack()), first instantiate the fragment: BlogFragment blogFragment =...

Caching in Webview is not working in Android

android,caching,webview,browser-cache,offline-caching

You are not able to cache documents from docs.google.com like this. The server can send a cache-control header as response to any request to set rules for the client about caching. As these documents from docs.google.com are never static, the response contains the instruction to don't cache your document. cache-control:no-cache,...

I can't query in WebView context

css,webview,console,calabash,calabash-android

Upgrade you Calabash-Android version to the latest one. 0.4.20 is a very old release and does not support crosswalk webviews.

Which Java-Datatype is required when calling JavaScript-Method

java,javascript,webview,javafx-8

Try myPDFFile.getURI().getURL().toString() since the method accepts URLs in the form of Strings. Since WebKit is running locally, you should be able to read file:// URLs. If you want to try the ArrayBuffer, then you can find some examples in the MDN JavaScript documentation at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer That means you need to...

android webview with russian text formated erreur

android,webview

try to use it webViewopresentation.loadDataWithBaseURL(null, text,"text/html", "UTF-8", null); ...

Get Progress of UIWebView

ios,swift,webview,progress

Not with a UIWebView, no; it isn't possible. But, new in iOS 8, you can use WKWebView, which has an estimatedProgress property which you can observe using key-value observing and thus get updates as the progress of loading proceeds....

webView hiding content in swift

html,ios,css,webview

try to the set the webviews scalesPageToFit property to YES!

inject CSS to a site with webview in android

android,css,webview,webkit

You can't inject CSS directly however you can use Javascript to manipulate page dom. public class MainActivity extends ActionBarActivity { WebView webView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); webView = new WebView(this); setContentView(webView); // Enable Javascript webView.getSettings().setJavaScriptEnabled(true); // Add a WebViewClient webView.setWebViewClient(new WebViewClient() { @Override public void onPageFinished(WebView view,...

webview not generating completely as bitmap in lollipop android

android,webview,bitmap

You need to call WebView.enableSlowWholeDocumentDraw() before creating any WebViews. That is, if you have any WebViews in your layout, make sure you call this method before calling setContentView() in your onCreate() shown below. if (Build.VERSION.SDK_INT >= 21) { webview.enableSlowWholeDocumentDraw (); } and its worked fine for me.. Thanks...

How to display an animated gif image in android with click functionality?

android,webview,animated-gif

I achieved this by using Glide library. For further reference, please check on this link https://github.com/bumptech/glide

Responsive website on different android devices like tablets and mobiles with a clear image quality?

android,webview

Reason is, Step 1: In HTML, height should be set as an auto-fit or in pixels instead of percent. So that website url may support for all different android devices using Webview. Hence, Webview engine has no advance feature. I have used older webkit engine. Step 2: If you do...

Video access with android AdvancedWebView

android,webview,android-webview

Manage to make it work! Once you have your camera capture working in webbrowser, to grant the camera permission: public void iniciaWebView(){ mWebView = (AdvancedWebView) findViewById(R.id.webview); mWebView.setListener(this, this); mWebView.setGeolocationEnabled(true); mWebView.addHttpHeader("X-Requested-With", appNomeLogs); mWebView.setWebChromeClient(new WebChromeClient() { @Override public void onPermissionRequest(final PermissionRequest request) { Log.i(appNomeLogs, "|> onPermissionRequest"); MainActivity.this.runOnUiThread(new...

WebView setDefaultZoom deprecated

android,webview

webview.setInitialScale(1); webview.getSettings().setLoadWithOverviewMode(true) webview.getSettings().setUseWideViewPort(true) This help you to remove setDefaultZoom(WebSettings.ZoomDensity.FAR)....

Android webview in viewpager

android,html,webview

That might be hard to do. Only thing that comes to my mind atm is creating view that will have knowledge of content thats within(view group) it and then calculating touch areas and then passing touch data to correct views, It will involve some view extending :) The simplest way...

MathJax to view mathMl in WebView of android

android,webview,mathjax,mathml

wq = (WebView) findViewById(R.id.qtext); wq.getSettings().setJavaScriptEnabled(true); wq.getSettings().setLoadWithOverviewMode(true); if (android.os.Build.VERSION.SDK_INT < 19) { wq.loadDataWithBaseURL("http://bar","<script type='text/javascript' " +"src='http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'>" +"</script><math display='block'>"+doubleEscapeTeX("Your Mathml code")+"</math>", "text/html","utf-8",""); } else {...

Android Webview: Mailto Unable to Implement

android,webview

I think webView.setWebViewClient(new WebViewClient()); this should be something like this : webView.setWebViewClient(new WebViewClient() { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { if (url.startsWith("tel:")) { initiateCall(url); return true; } if (url.startsWith("mailto:")) { sendEmail(url.substring(7)); return true; } return false; } sendMail will be : private void sendEmail(String add) { Intent i...

How to open external URL in default browser and all internal links in WebView Android?

android,webview,android-browser,external-links,internal-link

Change if (url.contains("http")) { // Could be cleverer and use a regex return super.shouldOverrideUrlLoading(view, url); // Leave webview and use browser } else { view.loadUrl(url); // Stay within this webview and load url return true; } to if (url.contains("http")) { // Could be cleverer and use a regex Intent intent...

How to load many (200-300) HTML pages in WebViews in background

android,webview

You should reconsider why you need to do this, it is never a good idea to cache this many objects into memory. Chances are the user will never move through all 300 pages during one session so you will have wasted resources loading many unnecessary WebViews. If you need to...

What are differnce between webview and web services in Android Platform

android,web-services,webview

I am sharing my Understanding here Web Service : A web service is a standard used for exchanging information between applications or systems of heterogeneous type. Software applications written in various programming languages and running on various platforms can use web services to exchange information over Internet using http protocol....

How to load the last url you have opened in a webview

android,webview

You can simply save your url to SharedPreferences and then, if url exist in your SharedPreferences reopen it. Like this: void someMethod() { WebView webView = (WebView) findViewById(R.id.webView); webView.setWebViewClient(new MyWebViewClient()); String url; if (sPref.contains("PREFS_ID")) url = sPref.getString("PREFS_ID", "DEFAULT_VALUE"); else url = "http://example.com"; WebSettings webSettings = webView.getSettings(); webSettings.setJavaScriptEnabled(true); webSettings.setBuiltInZoomControls(true); webSettings.setAllowContentAccess(true);...

Security of html and javascript files in Android and iOS Webview

javascript,android,ios,security,webview

Your javascript and html stuff could be loaded as encrypted data to the local storage afterwards decrypted and injected into the WebView locally. The loading javascript client from the local resource doesn't prevent to communicate with the remove service even then the original domain was local.

Android WebView only redraws left side of page

android,webview

Set setUseWideViewPort(true) in your WebView's settings

Android set margins for control inside webview doesn't work

android,layout,webview

You have to use WebView.LayoutParams instead of LinearLayout.LayoutParams. Replace LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(60,60, Gravity.TOP); params.setMargins(50, 50, 0, 0); with WebView.LayoutParams params = new WebView.LayoutParams(60, 60, 50, 50); ...

How to open WebView through the onListItemClick (using Volley/JSON)?

android,json,listview,webview

I believe you don't have to go through the trouble of getting your JSONArray and/or objects from inside it in onListItemClick. You can simply add a new field url to your Post class. Then inside public void onResponse(JSONArray response) where you are parsing your JSONResponse and putting corresponding values into...

Android WebView - get url redirected to, without loading the page in the webview

android,webview

Use shouldOverrideUrlLoading: @Override public boolean shouldOverrideUrlLoading (WebView view, String url) { // url to be loaded return true|false; } Returns True if the host application wants to leave the current WebView and handle the url itself, otherwise return false. ...

White background when rotating a webview

android,webview,rotation

Extremly strange. While playing around, I tried to modify the alpha value of the webview. Turns out it make the white background disappear! When setting any value other than 1 with the setAlpha method, the white immediatly goes away. Another thing appear thought : I have a TextEdit just above...

Android webview javascript not working on API 18 or higher

javascript,android,webview,webviewclient

What @Mattia said is correct. Use evaluateJavascript if possible. It has another advantage of being able to return the value of the result back from JavaScript. But if you want an API-agnostic workaround, make sure that the code you evaluate using loadUrl("javascript:...") just doesn't produce any return value. An assignment...

android, WebView application/pdf ~ Blank Display

android,pdf,webview

I'm attempting to display a PDF using WebView on android WebView does not display PDF files on its own. At best, it can do so with the assistance of some third-party JavaScript (pdf.js) or site (Google Docs). There are plenty of third-party libraries for rendering PDFs as well, which...

WebChromeClient OnJSAlert is not called

javascript,android,webview,webchromeclient

If you use a method name without the proper spelling, your method calls will not work onJSAlert Change to: onJsAlert ...

Changing one WebView from another WebView in JavaFX

webview,javafx,fxml,fxmlloader

I found a simple solution to this through the other questions Changing the text of a label from a different class in JavaFX and Changing JavaFX label using Javascript callback method The FXML file contains two web views and a label (label just to show a JavaFX control) <AnchorPane id="AnchorPane"...

Why My Android Webview Is So Slow

android,webview

OK, I solved the problem. Problem is not about WebSettings. view.setVisibility(View.VISIBLE); part is on my onPageFinished function and thats why site is loading so slow. I moved it to onPageStarted function and it works so fast.

WebView.draw() not properly working on latest Android System WebView Update

android,webview,bitmap

You need to call WebView.enableSlowWholeDocumentDraw() before creating any WebViews. That is, if you have any WebViews in your layout, make sure you call this method before calling setContentView() in your onCreate().

Javascript calling Android methods in WebView

javascript,android,webview

You're setting the visibility to View.GONE in both cases of the if (jsResult == "true") if statement. I think the window in the js is unneeded, so webView.loadUrl("javascript:window.Android.showAdBanner(showSdkAd())"); Should be webView.loadUrl("javascript:Android.showAdBanner(showSdkAd())"); Also, the javascript callback will be executed in a background thread, so you need to move to the main...

MobileFirst: adapter returned data containing special characters

jquery,twitter-bootstrap,webview,mobilefirst,mobilefirst-adapters

I had similar issue and the problem was the Liberty profile configuration on my Windows 2012 server. The data returned by the SQL adapter was presented in the phone as gibberish (wrong characters). The data wasn't native english of course. I assume your production server is indeed Liberty profile v8.5+....

How do I refresh the contents of a webview everytime the app is launched?

android,webview,android-webview,android-websettings,android-webservice

onResume() is called when the activity returns to the foreground. You can place your reload in there. Something like this: @Override protected void onResume(){ super.onResume(); webView.reload(); } ...

WebView tel: open chooser telephone or sms

java,android,webview,sms,telephony

Create a DialogFragment with 2 options and let the user decide what to do.

Why won't this work at changing the URL of a web View (resolved but it is now opening a new browser window instead of keeping it in the app???) [closed]

android,url,webview

Firstly, your WebView wont load the webpage at all, because the following line mWebView.loadUrl("webURL"); is wrong. You are supposed to pass a String object to loadUrl() method, and that string should be the url that you want to load. In your case its http://extremesportsshows.com/ which is stored in the webURL...

How to preserve loaded javascript content in a WebView when loading a new page?

javascript,cocoa,webview,state

As it turned out it's not possible to prevent the context recreation. Instead I ended up with a standalone JSContext instance (manually created) and a WebView instance I set as variable in that context. This way you can run your javascript in the standalone context but use the WebView to...

Display complex Html text in android like gmail

android,html,webview,textview,monodroid

WebView webview = (WebView)this.findViewById(R.id.webview); String html = "<html><head><title>TITLE!!!</title></head>"; html += "<body><h1>text header</h1></body></html>"; webview.loadDataWithBaseURL(filePath, html, "text/html", "UTF-8", null); if there is no filePath: webview.loadDataWithBaseURL(null, html, "text/html", "UTF-8", null); ...

Website dont work correctly on WebView when touching on item or menu in website

android,webview

The issue occurs because in some scenarios WebView fails to notice that its visible rect has changed, so as far as webkit is concerned the page is still not visible. Thus all touches fall outside of the window, and get rejected. The cleanest fix is when you know the visibility...

Xamarin iOS webview Zoom is not working

ios,webview,xamarin

Did you tried to set a delegate to the ScrollView instead of using the events? Something like this: public class ScrollViewDelegate : UIScrollViewDelegate { public override void DraggingStarted(UIScrollView scrollView) { Console.WriteLine("DraggingStarted"); } } webview.ScrollView.Delegate = new ScrollViewDelegate(); EDIT: Here is the complete code that I used for the test and...

Is default behavior of Android's WebView changed to open internally all links?

android,webview

I can reproduce the findings. Android System WebView 43.0.2357.121 exhibits the behavior that you describe, while the version I had on before upgrading to it did not. I have filed a bug report on this and now need to do more testing and warn the world. Thanks for pointing this...

Check for input in webview

android,webview

Unfortunately, there are no special form-related tools in Android WebView either. You can use the same approach as you have described for iOS. A couple of links to get you started: Read HTML content of webview widgets Android Web-View : Inject local Javascript file to Remote Webpage ...

Windows Phone: how to handle an event from a web page in a WebView?

events,webview,event-handling,windows-phone,handler

You can catch events triggered by Javascript code with ScriptNotify event described here. Not sure what you really want to do but this might be a starting point for you....

Hyperlinks within the same page in android webview to load within application page [duplicate]

android,webview

You're going to have to create a custom implementation of the WebViewClient for your WebView. Inside of your WebView Activity, add the following private class CustomWebViewClient extends WebViewClient { public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } } Now, when you initialize your WebView, add the following...

ner::ERR_CACHE_MISS Andorid 4.4 WebView porblem

android,caching,webview

Try to sostitute the code with this: WebView view = (WebView) findViewById(R.id.webView); WebSettings faller = view.getSettings(); faller.setJavaScriptEnabled(true); view.loadUrl("http://google.com"); view.setWebViewClient(new WebViewClient()); ...

JavaFX WebView can't load certain sites

java,webview,javafx,javafx-8,javafx-webengine

Reason is java.lang.Throwable: SSL handshake failed One solution can be: from this post http://stackoverflow.com/a/5671038/1032167: TrustManager trm = new X509TrustManager() { public X509Certificate[] getAcceptedIssuers() {return null;} public void checkClientTrusted(X509Certificate[] certs, String authType) {} public void checkServerTrusted(X509Certificate[] certs, String authType) {} }; SSLContext sc = SSLContext.getInstance("SSL"); sc.init(null, new TrustManager[] { trm },...

Unable to Full Screen Youtube Video Inside Custom Webview

android,webview,youtube

To achieve this you should: Implement showCustomView and hideCustomView methods of WebChromeClient. Set android:hardwareAccelerated="true" to your MainActivity in AndroidManifest.xml. There are two classes that inherit the WebChromeClient in your code (myWebChromeClient and MyWebChromeClient). The first implements showCustomView and hideCustomView methods and it seems fully working with full-screen video. The second...

Android webview append css to existing site

android,webview

this can be done using evaluateJavascript webView.evaluateJavascript("javascript: document.getElementById('header').setAttribute('style','background-color: red;') ", new ValueCallback<String>() { @Override public void onReceiveValue(String value) { //in case you have some return value from your script } }); ...

Android Webview: console is not defined

javascript,android,webview,android-webview

Sorry guys, unfortunally my code example was incomplete. The problem was that javascript was setting the Strict Mode (function($) { 'use strict'; /* * */ jQuery.ajaxSettings.traditional = true; console = console ? console : { log : function() {}, debug : function() {}}; window.c = console; /* * ... */...

amcharts not showing theme background in Android webview

javascript,android,webview,amcharts

There is a typo in your code: sb.append("chart.backgroundAloha = \"1.0\";"); It should read this instead: sb.append("chart.backgroundAlpha = \"1.0\";"); Also, alpha is a numeric parameter. I strongly suggest you supply it as number. I know you won't be displaying it in some old browsers that might be thrown off by this,...

Android webview: controlling which browser is used on redirection

android,browser,webview

Here is the solution: view.setWebViewClient(new WebViewClient() { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { if (url != null) { if (url.startsWith("http://")) { view.getContext().startActivity( new Intent(Intent.ACTION_VIEW, Uri.parse(url))); return true; } else { view.loadUrl(url); return false; } } else return false; } }); Long story short you override the method but...

How to identify web actions in JavaFX webview?

javascript,webview,javafx

You need to use setOnMouseClicked(), setOnMouseDragged() methods on the WebView. The following example prints Mouse Clicked! in the console for every Mouse Click event. import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.web.WebView; import javafx.stage.Stage; public class Main extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage...

xcode 6 - swift - passing a string through popover segue

swift,webview,segue,popover

Just the way you did it. If you are asking, how can I derive different strings from different buttons, the easiest way is to have different handlers that set a local variable, which is then proxied to the next VC as you have done. That is the most straight forward...

Google Maps URLs showing up blank in Xamarin webview on Android

android,ios,webview,xamarin,monodroid

This sounds more like a device specific issue to me as a simple reproduction works just fine on a Nexus 5 device. Have you tried other devices that have Google Maps enabled? (Might need to sign into a google account to view this). Secondly what does your "adb logcat" say...

Is AdView in Android contain a WebView inside it ?

android,webview,admob,adview

The Admob AdView uses a WebView.

'Access is denied' error for HTTP get request in Adobe Air App using IE

angularjs,internet-explorer,webview,air,xmlhttprequest

I resolved the issue by starting a local http server and hosting my xml files on it. This way the http get request had a url of the form http://localhost:<port>/myLocalFile.xml and got around the cross domain issues. This worked perfectly for me! Thanks to the contributors of the links below...

Backspace and undo button not working

android,android-studio,webview,android-webview

Nevermind, I just fixed it by making the last line of code return false

Android WebView loadUrl JavaScript not working API <=18 (but works in API >=19)

javascript,android,webview

SOLUTION I found the problem which was that the (encoded) message parameter sent in the JavaScript function had a line break [ \n ] in it. Removing that using the split function msg.split("\n"); made it work. ...

Android - Javascript Interface with pointer to WebView - how to achive it without memleak

java,javascript,android,webview,garbage-collection

WebView will hold your object (the instance of JSInterface) until you call removeJavascriptInterface("appBridge") and reload your page. But this kind of a circular reference isn't actually a problem for a mark-compact collector (used in languages with built-in garbage collection, like Java or JavaScript), because once such looped construction doesn't have...

Sencha touch lib not working on Chrome 43

android,webview,sencha-touch

I ran into a similar issue with my Sencha Touch app (almost nothing rendered). Here is the workaround I used which seems to work great: http://trevorbrindle.com/chrome-43-broke-sencha/...

Update the parent view when webView finishes on Android

android,webview,android-progressbar

I do it by javaScript at start I show progressBar on my webView and when page load completely I use a javaScript to notify java that should gone progressBar by this way: myWebView.addJavascriptInterface(new JavaScriptInterface(context), "jsInterface"); ProgressBar bar = (ProgressBar) view.findViewById(R.id.article_content_progressIndicator); public class JavaScriptInterface { Context mContext; /** Instantiate the interface...

Windows Phone 8.1 - get WebView Height [duplicate]

webview,windows-phone-8.1,win-universal-app

Well, I found a solution. :] If you wish to do the same, feel welcome to check out my solution on GitHub: https://github.com/romshiri/sizeable-webview...

Unfortunately app has stopped in webview using eclipse

java,android,eclipse,webview

Your xml name is wrong: setContentView(R.layout.activity_main); Replace activity_main by your xml fragment_main. setContentView(R.layout.fragment_main); And also change MainActivity package name in manifest. Replace com.example.androidwebviewexample.MainActivity To com.webception.demoappview.MainActivity ...

Android WebView content display issue

android,webview

After investigation I discovered that this issue is reproducing when you put your WebView into ScrollView and set if (Build.VERSION.SDK_INT >= 11) { webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null); } And amount of the information on the screen is approximately two screens or more then WebView become blank. To fix this do not set...

Xamarin Mac aplication doesn't react when I try to allow it in Dropbox

osx,webview,dropbox,xamarin.mac

I have found the solution for my problem which is quite a strange one (IMO) but maybe it's the default way on OSX. I subscribed to all event's the webView control has to offer and I found this "nugget". Once the user clicked on "Allow" the CancelClientRedirect event was raised...

How to access Windows Phone folders from a Gmail Wrapper App

windows,webview,windows-runtime,gmail,phone

The hosted browser (WebView) cannot show the native file picker. You'd need to proxy the request somehow and show the picker from C# for example. But, as you don't own the gmail source code, making the proper surgical changes would be difficult (and subject to be changed).

Intercept dialog from and read the contents

webview,dialog,dart,google-chrome-app

The problem definitely lies with your usage of Dart's Event class. It simply does not support the extra properties that Chrome is adding to the event: e.dialog, e.messageText, e.messageType. It does not seem like there is a ready solution for that, at least not in chrome.dart. Sadly, I don't know...

Passing token to angular app in IOS webview

javascript,angularjs,webview

I suggest to call a ad-hoc javascript function from webView Implement the UIWebView's delegate method webViewDidFinishLoad: in your UIViewController and in there you call [webView stringByEvaluatingJavaScriptFromString:@"setToken('your_token')"]; If you are using the Cordova framework you could use cordova-broadcaster-plugin...

Facebook comments in Android Webview

android,facebook,webview

After days of pulling my hair out, this turned out to be caused by changes in Android Lollipop. It took finally testing on an older device to realize the source of the issue, which quickly led me to this: https://developer.android.com/about/versions/android-5.0-changes.html#BehaviorWebView The ultimate solution turned out to be the following snippet...

Suppress “Failed to load resource: net::ERR_FILE_NOT_FOUND” in Chrome Packaged App

google-chrome,webview,google-chrome-app,console.log

Yes, you can turn this off: Click on the filter icon at the top of the console, and tick "Hide network messages". You can't, however, prevent this error from happening at all: it's not generated by an uncaught exception in JS but is reported from the network stack of Chrome....

Parse Jason to webview Android

android,webview

To pass in the string after the page is loaded, you could use String jsText = "javascript:addData('" + text + "');"); webView.loadUrl(jsText); EDIT : In your case, modify the url with the string: String urlWithData = yourUrl + "?data=" + text; webView.loadUrl(urlWithData); Then in the javascript, first get the text...

Android WebView not loading URL, error -400

android,webview

Problem was trivial: <uses-permission android:name="ANDROID.PERMISSION.INTERNET"/> is not correct, it should be: <uses-permission android:name="android.permission.INTERNET" /> Funny part is that AndroidStudio automatically gives you invalid permission on ctrl+space.......

Webview blank page quakenet

android,webview

The chat on the website seems to use websockets. According to this post: WebSocket in Android WebView websockets are not supported natively on android webview. Check your logcat for errors. You can try to follow this link and change your code http://foretribe.blogspot.it/2013/08/how-to-make-android-webview-support.html...

What is the default scale value of the WebView in Android?

android,webview

According to the Developers WebView documentation, the scaling depends on the pixel density on the screen of the device: By default, WebView scales a web page so that it is drawn at a size that matches the default appearance on a medium density screen. So, it applies 1.5x scaling on...

Crosswalk - Inflating class & Cie

android,webview,crosswalk-runtime

Replace this XWalkView cordovaWebView = new XWalkView(this.getApplicationContext(),this); cordovaWebView.load(url,null); setContentView(cordovaWebView); with setContentView(R.layout.cordova_layout); XWalkView cordovaWebView = (XWalkView)findViewById(R.id.cordova_webview); cordovaWebView.load(url,null); EDIT: Here is an example that worked for me: public class MainActivity extends AppCompatActivity { private XWalkView xWalkWebView; @Override protected void onCreate(Bundle savedInstanceState) {...

Access denied using local storage in Android WebView

javascript,android,webview

Access to localStorage is only allowed on pages from certain "Web-safe" schemes, like http:, https: and file:. It doesn't work for about: and data: schemes for example, or for any custom scheme you might be using. Chrome behaves the same way, you can check on desktop.

Website won't load in android webview but works fine in android browsers

java,javascript,android,android-intent,webview

Well I've been searching for about 2 months for an answer to this and as soon as I come here for help I find it myself haha, typical. Anyway, for anybody in a similar situation, as well as enabling javascript you also need to enable Dom storage by adding in;...

Android - How to open the Hangout app from a Hangout URL displayed in the webview?

android,android-intent,webview,google-plus,hangout

You can use WebViewClient.shouldOverrideUrlLoading to catch these links and then start an appropriate activity. A good example of how to launch the Google Play app this way is described here: Allow all 'market://' links from inside a webview to open Google Play store

IOS webview not show system alert like “the request time out”

ios,webview

IOS7 Class UIAlertManager = objc_getClass("_UIAlertManager"); UIAlertView *topMostAlert = [UIAlertManager performSelector:@selector(topMostAlert)];

Alert dialog from was blocked

javascript,webview,dart,google-chrome-app

A webview cannot show those by default. You need to catch the dialog event, show your own UI for it (remember, Apps can't use alert and friends, so a <dialog> is a good option) and then pass the response back with DialogController...

Using a Spinner to Change webView

android,webview,onclick,spinner

Here's what you need to know to get started with WebView : here There's all you need (according to your description) : The canGoBack() method returns true if there is actually web page history for the user to visit. canGoForward() to check whether there is a forward history. If you...

Communication between Titanium app and remote webview

javascript,webview,titanium,appcelerator

The way of passing the arguments is wrong . Below is correct way to send your parameter to the webview. $.webview.addEventListener('load', function(){ var data = "Hello world!"; $.webview.evalJS('foo(\'' + data + '\')'); }); Try with this. It should work in this case....

Why does javascript: on webview lead to a new page?

javascript,android,webview

On Chrome and newer versions of WebView, if a javascript: URL returns a value, this value is interpreted as content for a new web page to open. There are two ways to prevent this: Use WebView.evaluateJavascript() (doc) instead of WebView.loadUrl("javascript:..."). This also has the virtue of being able to return...

Resize ALL images in WebView with Text Autosizing

image,webview,resize,width

Ok, so I solved this one myself: // Content to be rendered content = "<p>Some Html </p> with <img></img> tags"; // Set width and height content = content.replace("<img", "<img height=\"auto\" width=\"100%\" "); // Render wv.loadDataWithBaseURL("", content, "text/html", "UTF-8", ""); and Voila, full width images with preserved Aspect Ratios!...

Parsing Data from android Sign Up page to webView Sign Up page

android,webview,website

You can't do that if the website don't provide the api service.

get value of webWiev.getUrl() in WebResourceResponse shouldInterceptRequest(WebView view, String url)

android,webview,android-webview

You can try this: public WebResourceResponse shouldInterceptRequest(WebView view, String url) { if (url.contains("images/srpr/logo11w.png") && Uri.parse(url).getHost().equals("www.google.com"){ return new WebResourceResponse("text/plain", "utf-8", new ByteArrayInputStream("".getBytes())); } return super.shouldInterceptRequest(view, url); } As the warning says you are calling the webview methods in the WebViewCoreThread. Thus modify your code like this, YourActivity.this.runOnUiThread(new Runnable() { public void...

childview in scrollview click delay after scroll

android,webview,scrollview

Finally, I have solved it by reading the document. I just put android:descendantFocusability="blocksDescendants" in the main child view of scrollview and then solve my problem. For Gopal Singh Sirvi asking, I think you need to put a webview in a scrollview in some cases. Let say the data of one...