webview

Flutter: how to enable gestures in a web view?

我是研究僧i 提交于 2020-02-01 09:17:23
问题 I would like to pinch in and out to zoom in my web view page in Flutter. I did some researches online and I found this somewhere: "Although pinch and zoom are built-in to WebView (Android) and UIWebView (iOS), they need to be "switched-on". In Android, the plugin needs to call the following: this.webView.getSettings().setBuiltInZoomControls(true); this.webView.getSettings().setSupportZoom(true); to allow pinch/zoom. In iOS, the plugin needs to call the following: self.webview.scalesPageToFit

Flutter: how to enable gestures in a web view?

為{幸葍}努か 提交于 2020-02-01 09:12:12
问题 I would like to pinch in and out to zoom in my web view page in Flutter. I did some researches online and I found this somewhere: "Although pinch and zoom are built-in to WebView (Android) and UIWebView (iOS), they need to be "switched-on". In Android, the plugin needs to call the following: this.webView.getSettings().setBuiltInZoomControls(true); this.webView.getSettings().setSupportZoom(true); to allow pinch/zoom. In iOS, the plugin needs to call the following: self.webview.scalesPageToFit

android原生和H5交互(转)

自作多情 提交于 2020-02-01 09:11:28
最近在左一个Android原生的H5混合开发的APP,之前还没有好好的总结一下Android原生 和 H5 之间交互的方法,这里来总结一下: 1、hybrid通信,主要就是前端的js和我们Android端的通信 这是最基本JS和Java 的通信方式: 这里我们分四块来讲: (1)、js调用android原生的代码(不传递参数) (2)、js调用android原生的代码(传递参数) (3)、android原生调用JS的代码(不传递参数) (4)、android原生调用JS的代码(传递参数) 好的我们这里先来创建一个工程: 在工程的main文件夹下创建一个文件夹assets ,然后把写好的H5页面放入该文件夹中,H5页面代码如下: < pre name = " code " class = " html " > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> < html xmlns = " http://www.w3.org/1999/xhtml " > < head > < meta http-equiv = " Content-Type " content = " text/html;

Camera on Xamarin WebView

倾然丶 夕夏残阳落幕 提交于 2020-02-01 08:59:31
问题 I have a simple Xamarin Page with a WebView that calls a WebRTC test page: _webView = new WebView { Source = "https://test.webrtc.org/", WidthRequest = 1000, HeightRequest = 1000 }; var stackLayout = new StackLayout() { Orientation = StackOrientation.Vertical, Padding = new Thickness(5, 20, 5, 10), Children = { _webView } }; Content = new StackLayout { Children = { stackLayout } }; The https://test.webrtc.org/ page works fine on Chrome on the same Android Emulator, but don't work on WebView

javafx webview not supporting Ajax web features

不羁的心 提交于 2020-02-01 04:58:05
问题 I am trying to open webpage in webview using JavaFx . Its opening the web page properly but its not supporting the Ajax based web features like partial refreshing and new window popup handling I am using the following code final Group group= new Group(); Scene scene= new Scene(group); fxpanel.setScene(scene); WebView webview = new WebView (); group.getChildren().add(webview); eng= webview.getEngine(); eng.setJavaScriptEnabled(true); try{ String url="http://www.abc.com"; eng.load(url); eng

Android WebView URL intercept , i want to load only one website and it's pages , and nothing else

你。 提交于 2020-01-30 12:01:02
问题 I have a problem , i'm trying to create an app for my website and i'm using android webview to do that, but since there's external links (ads, backlinks.. etc) in my website , when the user clicks these links , the webview opens the links and my app acts like a browser , i know that's what webview is but i want it to open only links of my website i ovverided the shouldOverrideUrlLoading method and i intercepted the urls and i returned true if the urls are diffrent than my website prefix , but

Android WebView URL intercept , i want to load only one website and it's pages , and nothing else

时光总嘲笑我的痴心妄想 提交于 2020-01-30 11:59:07
问题 I have a problem , i'm trying to create an app for my website and i'm using android webview to do that, but since there's external links (ads, backlinks.. etc) in my website , when the user clicks these links , the webview opens the links and my app acts like a browser , i know that's what webview is but i want it to open only links of my website i ovverided the shouldOverrideUrlLoading method and i intercepted the urls and i returned true if the urls are diffrent than my website prefix , but

URL not loading in webview but loaded in browser in android?

拜拜、爱过 提交于 2020-01-30 07:57:05
问题 Some type of Urls are not loading in my app in Webview but it can be loaded in device browser. Following is the example Url which is not working in my code- "http://apps.takeyourapp.com/testApp/staging/index.html" package com.example.webviewdemo; import android.os.Bundle; import android.app.Activity; import android.view.Menu; import android.view.ViewGroup; import android.webkit.WebView; import android.widget.FrameLayout; import android.widget.LinearLayout.LayoutParams; public class

Chrome调试模式获取App混合应用H5界面元素

允我心安 提交于 2020-01-29 05:05:39
原文章地址http://blog.csdn.net/qq_19636353/article/details/53731254 浏览器的远程调试工具,使得我们可以通过PC上开启的控制台,调试手机浏览器中正在运行的代码。运行于 Android 4+系统的Chrome for Android 同样也可以配合ADB(Android Debug Bridge)实现桌面远程调试。桌面版Chrome32+已经支持免安装ADB即可实现远程调试移动设备页面/WebView 。 Android远程调试目前支持所有操作系统,并且支持以下: ● 调试站点的页面 ● 调试安卓原生App中的WebView ● 实时将安卓设备的屏幕图像同步显示到开发机器。 ● 通过端口转发(port forwarding)与虚拟主机映射(virtual host mapping)实现安卓移动设备与开发服务器进行交互调试。 而在最新的Android 4.4 Kitkat版本中,原本基于Android WebKit的WebView实现被换成基于Chromium的WebView实现。 移动端 1. 在eclipse中配置AndroidSDK环境(Android6.0、ADT23.0) 2. 将手机与PC通过USB连接,开启USB调试模式; 3. 使用360手机助手或在dos窗口输入adb devices查看手机驱动连接是否成功;

Android WebView加载网页失败异常处理

坚强是说给别人听的谎言 提交于 2020-01-29 04:15:02
开发过程中会遇到WebView加载失败的时候,会出现404、500、找不到网页等错误,页面显示系统默认的错误界面。系统默认界面难看,而且也会暴露网页地址不安全。所以我们需要对WebView加载失败或错误进行处理,自定义一个统一样式来加载失败的界面。 网页加载失败图 解决方案 我们可以自定义一个View用来展示加载失败的界面,也可以写一个错误展示的 Html让 WebView加载等。这里我们需要先重写 WebViewClient 的 onReceivedError() 和 WebChromeClient 的 onReceivedTitle() 方法。 Android 6.0以下处理方法: ① 判断 Html页面的标题中是否含有“Error”、“找不到网页”等信息; @Override public void onReceivedTitle(WebView view, String title) { super.onReceivedTitle(view, title); // android 6.0 以下通过title获取判断 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { if (title.contains("404") || title.contains("500") || title.contains("Error")