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
0
votes
2 answers

Android WebChrome Client Promts/Opens Link in browser rather than WebView

Upon launch of the activity, the webview should load the designated url but in the simulator it launches the native browser and on the physical device it prompts to open the url in in the browser. @Override protected void onCreate(Bundle…
theFizz
  • 23
  • 4
0
votes
0 answers

How to detect and close JavaScript dialog close button to dismisss the popup android

I am using webview to display the url. It displays the popup with scrolling map with close button. https://www.onemap.sg/main/v2/ [this displays only in mobile] When I click close button, it's not working. Dialog is not closing. Moreover at the…
Shadow
  • 6,864
  • 6
  • 44
  • 93
0
votes
1 answer

When I use from setWebChromeClient I can't use from onPageStarted webView - Android

I am using from below code for upload file in webView : @SuppressLint("SetJavaScriptEnabled") private void loadWebView(String url) { if (getActivity() != null) { if (Build.VERSION.SDK_INT >= 23 &&…
user4813855
0
votes
0 answers

WebChromeClient Microphone, Camera, audio,video capture permission

I am using WebChromeClient in an Android application to access a third party website. The site is getting loaded on my WebChromeClient, but I am facing the following issues - When I am clicking on any link it is getting redirected to the installed…
V.Paul
  • 1
0
votes
1 answer

onActivityResult the image uri not work

i try from a cordova plugin to return an image taken from the camera. The image is saved and exists, when I return the array of uri with the uri of the image, I retrieve nothing. If i take from gallery it works, the code in the "onActivityResult"…
0
votes
0 answers

how to toggle the full screen for webview inside android custom alert dialog?

I have custom android alert dialog with android web view inside it and other information. What i want: I want to toggle the full screen of android web view for custom alert dialog. P.S As full screen functionality is deprecated for web view…
0
votes
0 answers

getting video link source full screen video player android java

I have webview android application and I play embed videos inside it. I can play This videos is fullscreen. I want to get video source link from it. I think that if i play this videos fullscreen. I can get source link of videos. Is it possible ? So…
0
votes
0 answers

Losing Webview Content After Selecting File Instead of Updating it (Android Webview)

After some practices I can select a file from my phone with openFileChooser() and I get the result via OnActivityResult(). My problem is that after opening file chooser my fragment goes to OnPause() and after selecting the file, I lose my webview…
0
votes
1 answer

How to end scrolling of Webview 300 dps from end of Webview (or end of web page)? (Android Java)

I am unable to edit some footers on my web page and therefore would like to hide the web page footer by not allowing the user to scroll there. I have the following Webview; myWebView.loadUrl(value); …
Zac1
  • 208
  • 7
  • 34
0
votes
1 answer

WebChromeClient not displaying the "message" parameter to the onJsPrompt function

I want my WebView to display a prompt just like a web browser would. From other answers addressing alert(), I found that I must do something like this in my Java code: myWebView = (WebView) findViewById(R.id.webview); WebSettings webSettings =…
Michael
  • 9,060
  • 14
  • 61
  • 123
0
votes
1 answer

onJsAlert return message is object not string

I'm making a call webView.loadUrl("javascript:alert(javascriptFunc())); webView.setUpWebChromeClient( new WebChromeClient() { @Override public boolan onJsAlert(WebView view, String url, final String message, JsResult result) { .... }}); The…
temp
  • 639
  • 1
  • 8
  • 22
0
votes
1 answer

Javascript isn't execute within onJAlert callback after new Android System Webview updated

|After the latest updated of the Android System Webview (52.0.2743.98) I noticed that javascript can't be executed withing the onJsAlert method. More specifically the following piece of code stopped working after the latest update private class…
Chris
  • 1,641
  • 1
  • 16
  • 17
0
votes
0 answers

Chrome Custom Tabs with WebChromeClient's onCreateWindow Method -- how to get URL in onCreateWindow

I'm working on launching a pop-up link (an Amazon shopping cart) out of my webView, and I have it working so that the cart loads in the web browser, which was my original intent. But, I'm interested in using Chrome Custom Tabs to make the transition…
Ethan
  • 103
  • 1
  • 9
0
votes
1 answer

Prompt, Alert and confirm JavaScript inside a Android WebView not found

I'm writing an application on android that shows a transmition from an Ip Camera, this camarea is a D-Link, for see the transmission I go to the ip: 192.168.1.4/MJPEG.CGI?.mjpeg and it works in my navigator, but to access it asks me for an account…
0
votes
0 answers

Can't upload files in android webview application

I am using simple webview for my responsive website. App is working fine but the file upload control is not working, I can't upload images, docs, ppt or excel files from the app. I have created webview in android studio. I have added following…
Vaibhav Gole
  • 165
  • 1
  • 3
  • 18