webview

Android Webview error code -6

北战南征 提交于 2021-02-09 11:43:54
问题 Hi everyone I am having an issue with an android webview : The webview works fine until I try to redirect to specific url ( which coincidentally happen to ask for cookies) "net::ERR_CONNECTION_RESET" is the error description and "-6" is the error code. Can anyone assist with how to fix this ? If I use the device browser it is working fine but with webview I get an error: **My webview client** import android.content.Context; import android.net.Uri; import android.os.Build; import android.util

Android Webview error code -6

馋奶兔 提交于 2021-02-09 11:42:05
问题 Hi everyone I am having an issue with an android webview : The webview works fine until I try to redirect to specific url ( which coincidentally happen to ask for cookies) "net::ERR_CONNECTION_RESET" is the error description and "-6" is the error code. Can anyone assist with how to fix this ? If I use the device browser it is working fine but with webview I get an error: **My webview client** import android.content.Context; import android.net.Uri; import android.os.Build; import android.util

Android WebView: crash after url loading

不羁的心 提交于 2021-02-08 21:38:25
问题 When loading an url with my webView, application crashes after few seconds (without error log...). My Code : wv = new WebView(this); wv.clearCache(true); wv.clearHistory(); wv.getSettings().setJavaScriptEnabled(true); wv.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); wv.setDownloadListener(new DownloadListener() { @Override public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { Intent intent = new Intent

Android WebView: crash after url loading

夙愿已清 提交于 2021-02-08 21:33:07
问题 When loading an url with my webView, application crashes after few seconds (without error log...). My Code : wv = new WebView(this); wv.clearCache(true); wv.clearHistory(); wv.getSettings().setJavaScriptEnabled(true); wv.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); wv.setDownloadListener(new DownloadListener() { @Override public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { Intent intent = new Intent

How to link html files in WebView?

时光毁灭记忆、已成空白 提交于 2021-02-08 10:24:40
问题 I have a huge folder of htm files and a single html file with a href links to each of these htm files. I would like to create an android app, for personal use, to make browsing these files easier on a tablet. I managed to load the main html file to WebView in Android Studio, but clicking any URL results in a crash, therefore I can't load any htm file through my html catalog. I am not experienced in android programming, I only have some out-of-date experience in website creation back from the

How to link html files in WebView?

倖福魔咒の 提交于 2021-02-08 10:24:16
问题 I have a huge folder of htm files and a single html file with a href links to each of these htm files. I would like to create an android app, for personal use, to make browsing these files easier on a tablet. I managed to load the main html file to WebView in Android Studio, but clicking any URL results in a crash, therefore I can't load any htm file through my html catalog. I am not experienced in android programming, I only have some out-of-date experience in website creation back from the

How to swith to iframe inside shadow dom with selenium

此生再无相见时 提交于 2021-02-08 09:53:39
问题 Application under test is based on Electron (version 9.1.1) written as desktop application for Linux. In electron there are custom tag <webview> that is quote "The webview tag is essentially a custom element using shadow DOM to wrap an iframe element inside it." I can access shadow dom and get iframe as WebElement out of it with Java selenim(version 3.141.59). But swithcing to iframe still left me on parent context. And my question is: HOW TO SWITH TO IFRAME INSIDE SHADOW DOM? //getting

Xamarin WebView usually shows nothing

被刻印的时光 ゝ 提交于 2021-02-08 09:27:28
问题 public partial class Page : ContentPage { public Page(string filename) { if(... { WebView view = new WebView { Source = "http://xamarin.com" //Source = "http://www.google.com" /*Source = new HtmlWebViewSource { Html = @"<html><body> <h1>Test Code</h1> <p>The code is working.</p> </body></html>" }*/ }; Content = new StackLayout() { Children = { view } }; } else ... The page appears blank most of the time. In the xamarin.com example, after a long delay, the page fills in about 20% of the times

Highlight the selected text in webview. [Android]

妖精的绣舞 提交于 2021-02-08 08:33:28
问题 I have certain text in the web view. I can select those text . I want to highlight those text but I have no idea how to do it. Anyone having any idea about it, please help! Thanx! 回答1: you need to run java script public static String Highlightscript = " <script language=\"javascript\">" + "function highlightSelection(){" + "var userSelection = window.getSelection();" + "for(var i = 0; i < userSelection.rangeCount; i++)" + " highlightRange(userSelection.getRangeAt(i));" + "}" + "function

Apache Cordova load external URL or website inside div

大憨熊 提交于 2021-02-08 08:00:49
问题 I am loading Website inside App using cordova.InAppBrowser.open('example.com', '_self', 'location=no,clearsessioncache=yes') and everything is works fine i.e it shows complete website mobile view inside the app, but now I am using some navigation inside assets\www\index.html file and when user will click on link the navaigation I want to load the website inside the div OR without losing the navigation. function load_web(URL) { cordova.InAppBrowser.open(URL, '_self', 'location=no