android-webview

Launch custom Android application from WebView

半城伤御伤魂 提交于 2019-12-30 03:25:06
问题 I have an HTML file which is launching an app if I open it in the Android native browser, but when I try to open the same in a WebView, it is not able to launch that application, and "Webpage not available" is shown. I think my WebView is not able to handle the scheme "my.special.scheme://" defined for the application. I read Launching an Android Application from the Browser, but it does not cover information about launching an app from a WebView. 回答1: I'm not sure, but I believe that WebView

Webview not able to load https url in android?

非 Y 不嫁゛ 提交于 2019-12-30 00:58:06
问题 I am implementing webview application in android. When i am trying to load https url one or two times it finishes the activity . Agian trying to load https url it shows webpage not available. please find below image what i got. When i click on that url again, then it shows the websit. I used the below code for loading the url. webView = (WebView) findViewById(R.id.webView); webView.getSettings().setJavaScriptEnabled(true); webView.loadUrl("https://www.facebook.com"); webView.clearView();

Android - adding a image in html webview

最后都变了- 提交于 2019-12-29 09:01:30
问题 Ok so the image i'm using is called test.png and I have a java class (Cherry.java) and a xml class (cherry.xml) Also I have a html file in the /res/raw folder called htmltest.html. What i'm trying to do is when the user clicks a button on the previous page and then takes them to cherry.xml all it is a webview. Now in the java class its just opening up the htmltest file and in the html file is just a normal web based layout. I want to display images in the html file so a image thats in the

What does “install Flash plugin” in WebView mean?

耗尽温柔 提交于 2019-12-29 07:52:17
问题 In a small WebView app I wrote, I am able to load YouTube and see the picture the represents a video clip, with the familiar right-pointing arrow that is supposed to start playing the video: But... when I touch that arrow, nothing happens (the video is NOT played). I did enable the plugins setting in WebView, but that didn't help: mWebView.getSettings().setPluginsEnabled(true); So, I searched for more clues about how to make Flash (YouTube) run embedded in my WebView and I found the following

HTML5 video remove overlay play icon

穿精又带淫゛_ 提交于 2019-12-29 06:56:12
问题 How do I remove the overlay play icon (triangle) that's visible in the center of the video for a second or so every time a video starts playing in an Android WebView? Thanks in advance! 回答1: If you said about this picture This is picture I had when tested my app on Android 6.0. You can hide this picture. For example: WebView mWebView = (WebView) findViewById(R.id.web_view); mWebView.setWebChromeClient(new WebChromeClientCustomPoster()); Chrome client class: private class

Unable to open PDF documents in WebView

半城伤御伤魂 提交于 2019-12-29 06:30:18
问题 I am using WebView to open a url which is in fact a pdf document. Here is the code snippet. WebView webView = (WebView) context.findViewById(R.id.webView1); webView.getSettings().setJavaScriptEnabled(true); webView.getSettings().setLoadWithOverviewMode(true); webView.getSettings().setUseWideViewPort(true); webView.loadUrl("http://www.stagecoachbus.com/PdfUploads/Timetable_28768_5.pdf"); And the error obtained is: EventHub.removeMessages(int what = 107) is not supported before the WebViewCore

WebView reloading when Fragment in ViewPager is retained form BackStack

喜你入骨 提交于 2019-12-29 04:33:47
问题 Here is a code for a basic Fragment which contains a WebView . WebFragment.java public class WebFragment extends Fragment { String TAG = "WebFragment"; private WebView webView; private String currentUrl = "http://www.google.com"; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { return inflater.inflate(R.layout.webview_layout, null); } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated

Android webview: highlight a specific word in a page using javascript?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-28 12:44:48
问题 i am using a webview inside my android application. I would like to know if it is possible to highlight or underline a specific word/sentence/paragraph in a loaded page using code done in javascript? thanks 回答1: You should look at this page. Do a view source. They use pure Javascript--not even jQuery--to highlight particular words on the webpage. Basically they load all of the text they want to search through into a variable and continuously find the indexOf the search term they want to

Full screen option not available when loading YouTube video in WebView

亡梦爱人 提交于 2019-12-28 05:54:11
问题 I have work so many time with the webview with in Android app. But this time I got strange issue with loading YouTube video in to WebView. See, this is the screen shot of YouTube video loaded in Chrome browser, which have full screen option in it. Now, below is the screen shot of my app in which I have loaded same video in webview. But it is not having that full screen option. You can see the changes in both the images. Both the screen shots are taken from same device. But still it looks

Add javascript into WebView

╄→尐↘猪︶ㄣ 提交于 2019-12-28 05:42:04
问题 I am developing an application where in 1 part I want to add javascript into WebView.. But am not getting how to do it in an appropriate way.. Can anyone pls guide me into this????? I am doing it like: wb=(WebView)findViewById(R.id.webView1); wb.getSettings().setJavaScriptEnabled(true); wb.getSettings().setPluginState(WebSettings.PluginState.ON); wb.getSettings().setPluginsEnabled(true); wb.loadUrl("javascript:<script " ></script> "); wb.setWebViewClient(new HelloWebViewClient()); public