webview

Error in Webview with targetSdkVersion 24

半世苍凉 提交于 2021-01-27 01:32:36
问题 My app has a WebView which loads a simple HTML page with an iFrame that is used for loading an URL for payment process from a partner company (and I have no access to that url source). When I point the targetSdkVersion to 19 everything works fine and I can make payments through the iFrame. However, when the targetSdkVersion is pointed to 24 I don't have the same luck. In that case, the WebView manages to load the iFrame which is shown some EditText for entering with credit card information

How to show a local html in flutter?

江枫思渺然 提交于 2021-01-24 07:32:21
问题 I have a zip file to download. After it has been downloaded, I save it in External Storage (/storage/emulated/0/Android/data/...). I want to show a html page from the storage. How to show the html page using webview? I also want a javascript function that can be loaded when I clicked something in webview. I've tried using inappwebview but it can't load local html file from external storage. 回答1: using flutter_inappwebview plugin (using assets ,you can manpulate to use whatever you want)

How to play video fullscreen with landscape in Android WebView?

不想你离开。 提交于 2021-01-21 09:17:31
问题 I want to play video fullscreen in Android WebView , so I use HTML5 tag <video> and put these web files into src/main/asset/... folder. But when I clcik 'Fullscreen' button, the video just moving to center in the vertical direction(portrait). So, my question is how to set fullscreen in landscape? Thank you. 回答1: I used cprcrack/VideoEnabledWebView and RotatedVerticalFrameLayout. I just changed part of onShowCustomView(View view, CustomViewCallback callback) in VideoEnabledWebChromeClient. //

How to play video fullscreen with landscape in Android WebView?

限于喜欢 提交于 2021-01-21 09:15:54
问题 I want to play video fullscreen in Android WebView , so I use HTML5 tag <video> and put these web files into src/main/asset/... folder. But when I clcik 'Fullscreen' button, the video just moving to center in the vertical direction(portrait). So, my question is how to set fullscreen in landscape? Thank you. 回答1: I used cprcrack/VideoEnabledWebView and RotatedVerticalFrameLayout. I just changed part of onShowCustomView(View view, CustomViewCallback callback) in VideoEnabledWebChromeClient. //

How to play video fullscreen with landscape in Android WebView?

无人久伴 提交于 2021-01-21 09:15:24
问题 I want to play video fullscreen in Android WebView , so I use HTML5 tag <video> and put these web files into src/main/asset/... folder. But when I clcik 'Fullscreen' button, the video just moving to center in the vertical direction(portrait). So, my question is how to set fullscreen in landscape? Thank you. 回答1: I used cprcrack/VideoEnabledWebView and RotatedVerticalFrameLayout. I just changed part of onShowCustomView(View view, CustomViewCallback callback) in VideoEnabledWebChromeClient. //

Android 7 WebView with wrap_content

∥☆過路亽.° 提交于 2021-01-21 06:52:18
问题 I have a WebView with android:layout_height="wrap_content" inside a ScrollView . Prior to Android 7 this resulted in the WebView resizing to the height of the local html content I set with loadData . On my Nexus 5X with Android 7 though, the WebView height seems to be unreliable, sometimes it only shows parts of the first text line, sometimes there's a big gap at the end of the content. I think it could be due to Google now using Chrome for WebViews starting with Nougat. Does anyone have an

How open link in safari mobile app from webview

纵然是瞬间 提交于 2021-01-21 04:24:05
问题 There are many topics of this here, but they all need native code interaction to work. In my case, it is necessary to be able to do it directly from the url, without any interaction with my mobile app. I tried: <a href="safari://google.com" target="_blank">Open Google in Safari</a> and <a href="webkit://google.com" target="_blank">Open</a> and based in this post. <script> $(document).on('click', 'a[target="_blank"]', function (ev) { var url; ev.preventDefault(); url = $(this).attr('href');

Change WebView url from AppDelegate

泪湿孤枕 提交于 2021-01-19 06:17:12
问题 I'm receiving notifications from Firebase in the AppDelegate class. This notification contains a String named "notif_url". I've put this value in a var named "desired_url" and now I need to change my WebView url with the "desired_url" value. But I can't access to the webview to change it url like this : @IBOutlet weak var my_web_view: UIWebView! func load_url(server_url: String){ let url = URL(string: server_url); let request = URLRequest(url: url!); my_web_view.loadRequest(request); } load

How to customize scrollbar for atom electron iframe or webview?

主宰稳场 提交于 2021-01-07 03:39:54
问题 How to customize scrollbar for atom electron iframe or webview ? My example: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <titleScrollbar Demo</title> </head> <body style="margin: 0px;overflow:hidden;"> <iframe src="http://bbc.com" height="500" width="500"></iframe> <webview src="http://bbc.com" height="500" width="500"></webview> </body> </html> 回答1: Electron 11: this.webview.addEventListener("dom-ready", (e: Electron.IpcMessageEvent) => { this.webview.insertCSS(` ::-webkit-scrollbar

Android webview使用详解

二次信任 提交于 2021-01-06 23:08:18
1. 打开网页时不调用系统浏览器, 而是在本WebView中显示: mWebView.setWebViewClient( new WebViewClient(){ @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true ; } }); 2. 通过java代码调用javascript WebSettings webSettings = mWebView .getSettings(); webSettings.setJavaScriptEnabled( true ); mWebView.addJavascriptInterface( new Object() { public void clickOnAndroid() { mHandler.post( new Runnable() { public void run() { webview.loadUrl("javascript:wave()"); } }); } }, "demo"); 3. 按返回键时, 不退出程序而是返回上一浏览页面: public boolean onKeyDown( int keyCode, KeyEvent event) { if (