Questions tagged [webchromeclient]

WebChromeClient is an Android class to intercept JavaScript dialogs, loading progress, and other events.

WebChromeClient is an Android class to intercept a Webkit Webview's JavaScript dialogs, loading progress, and other events.

Resources

137 questions
2
votes
2 answers

Check Url completely loaded Webview

I want to show a progressBar till all resources are loaded. I've tried below code, but progressBar will go off when resources starts loading. dataBinding.webviewGallery.setWebViewClient(new WebViewClient() { @Override public boolean…
Shahal
  • 1,008
  • 1
  • 11
  • 29
2
votes
1 answer

Overriding Android WebChromeClient's onCreateWindow method results in SIGSEGV

I tried to override the default WebChromeClient in order to get give my application's WebView the ability to open new windows. For this, as instructed in the manual, I'm overriding the 'onCreateWindow' method of WebChromeClient wherein I do the…
Ashok G
  • 121
  • 1
  • 2
  • 6
2
votes
2 answers

How To access method inside WebChromeClient?

i am setting up a method in webchromeclient like this: web1.setWebChromeClient(new WebChromeClient() { public void onHideCustomView(){} }); Then i want to create javascriptinterface to call onHideCustomView(). How can I call method which is inside…
zokitis
  • 21
  • 2
2
votes
2 answers

WebChromeClient Integrate in Android App

I'm trying to solve a problem in integrating WebChromeClient and try to achieve this one below (If possible). Mine: Steps that I made: I create an Activity with WebView in it. And just reflect the Url in the toolbar as title. How can we somehow…
2
votes
0 answers

Android Fatal signal 6 (SIGABRT) at 0x00000584 (code=-6) webView (KITKAT 4.4.2)

I am trying implement the filechooser of my webpage in my webview. I am getting 'SIGABRT' error while using showFileChooser(ValueCallback uploadMsg, String acceptType) in my webview. when I get the result from intent and set the filepath in the…
2
votes
0 answers

File Picker from Android Webview is not working except Lollipop Version

I tried a lot to upload file through WebView but I not getting success, but its working only 5.0 Devices. Google Chrome Browser handling all the things & working fine in all devices. public class MyWebChromeClient extends WebChromeClient { …
Narendra Sorathiya
  • 3,770
  • 2
  • 34
  • 37
2
votes
0 answers

Android WebView, Denied starting an intent without a user gesture

I'm trying to use custom WebChromeClient, but for some URL's in android marshmallow and nougat it show's me below error in logcat and don't load URL, but it's working fine for pre marshmallow. The error: W/cr_AwContentsClient: Denied starting an…
2
votes
1 answer

How to hyperlink android html assets when using chrome client?

I have a main page (main.html) in the assets folder that I am displaying with: webview.setWebChromeClient(new MyWebChromeClient()); webview.getSettings().setJavaScriptEnabled(true); webview.addJavascriptInterface(new VersionCallbackScript(),…
mobibob
  • 8,670
  • 20
  • 82
  • 131
2
votes
1 answer

How to get the Javascript messages from android webview

Hey guys I wanted to inject some code into a webview and see whether the code has succeeded. I've tried to override the onConsoleMessage method of WebChromeClient but it only reports whether the code is an uncaught reference public boolean…
John Smith
  • 844
  • 8
  • 26
2
votes
0 answers

Android chrome webview client doesn't go full screen

I am trying to play Youtube videos in full screen mode inside a webview in my app. I was able to enable the fullscreen button inside the webview . /** MainActivity * Fullscreen video variables */ //Stores the custom view passed back by the…
2
votes
0 answers

Using Google Analytics in a WebChromeClient on Android?

Currently loading a webpage which has Google Analytics in a WebChromeClient in an Android app. The problem is, the app doesn't seem to be triggering any GoogleAnalytics callbacks (no data showing up from it). Originally thought the issue was because…
David
  • 1,007
  • 7
  • 14
2
votes
0 answers

Android crash when use WebView to watch video in separate view

I have a fragment using a RelativeLayout to hold a webview, and assigned a custom WebChromeClient to it. When I use the webview to watch Youtube video, it can shows video in a separate view. However, when I exit from the separate view and go back…
Season
  • 1,178
  • 2
  • 22
  • 42
2
votes
1 answer

When does onProgressChanged get to 100?

In my android application, I have a webview that loads a javascript file. The javascript in turn loads a few images. //javascript file var imageObj = new Image(); imageObj.onload = function() { // my images is fully loaded …
Lizozom
  • 2,161
  • 2
  • 21
  • 38
2
votes
2 answers

Upload photo from gallery or take from camera in Webview

My application is webbased and need to upload photos, website have a file input button, i made it work with this wv = new WebView(this); wv.setWebViewClient(new WebViewClient()); …
Alper
  • 231
  • 4
  • 11
2
votes
2 answers

Prevent Chrome from reloading page on re-orientation?

This is my first app, it is a web app, it simply loads a webView to a url where stuff happens. It works fine in android browser(gingerbread), but in Chrome(ICS, JB) it was going back to the initial webView url when the device is rotated. In…
1 2
3
9 10