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
1
vote
0 answers

WebChromeClient.onReceivedIcon's icon get recycled sometime later in Android 4.4+

public void onReceivedIcon (WebView view, Bitmap icon) in my code, when this callback get called i keep a ref of icon, will keep it around for a long time. I need this to show as history item's icon, it works well in all version of Android except…
xiaoweiz
  • 162
  • 3
  • 10
1
vote
1 answer

Android Ask for permission to use location within webview

I have an application that uses a webview and inside the webview is a map, I have got it working to the user automatically find the users location with the following code: Manifest file Permissions:
Paddy1990
  • 946
  • 4
  • 13
  • 30
1
vote
1 answer

Is there a way to hide addressbar in webchromeclient?

I am developing an android application in which I want to show a website, which have links in it. When any link is clicked, then it plays an online stream. Till now I have developed an app which work alright. In this I have used webview to display…
SJSSoft
  • 723
  • 2
  • 10
  • 28
1
vote
1 answer

Android WebView localStorage

I'm attempting to get a HTML5 localStorage example working within an Android WebView (Webkit, ChromeClient). However I'm having no luck. Everything works from the phones browsers just not from the WebView. Activity: public class BrowserActivity…
Ben Crowhurst
  • 8,204
  • 6
  • 48
  • 78
1
vote
1 answer

does WebChromeClient unsupport php iframe tag?

i load an url given by other system in webview.but it doesn't display all contents,it leaves a blank window in the page.i check the source code,it has a frameset tag and some iframe tags. att src is correct.why it can't load content from src?does…
kevin
  • 11
  • 3
1
vote
3 answers

Link in WebChromeClient does not open safari when using WebViewClient shouldOverrideUrlLoading

I use WebChromeClient for opening a link to news.html on my server, it opens safari and shows the content, ok. But... When I implent WebViewClient shouldOverrideUrlLoading to intercept the call when it's link to a .pdf file (use another class for…
Harry
  • 786
  • 1
  • 8
  • 27
1
vote
2 answers

Embedded Youtube player getting cut off

I am trying to embed youtube video in my android app using WebView. Here is the code: { WebView mView = new WebView(getContext()); String embeded = loadPlayer(); // this is javascript string containing YtPlayer api WebSettings…
1
vote
0 answers

Android WebChromeClient integration with javaScript gives Unexpected Illegal token

Home.java public void updatePhoto(Bitmap bitmap) { String bitmapStr = BitMapToString(bitmap); Home.currentBmp = bitmap; String parameter = "data:image/jpeg;base64," + bitmapStr; webView1.loadUrl("javascript:var script =…
Dearwolves
  • 443
  • 4
  • 16
1
vote
1 answer

WebChromeClient Websocket support?

Android comes with two webviews (SetWebViewClient and SetWebChromeClient) and it's painfully obvious that the regular web client has zero websocket support. However, I'm not sure of the capabilities of the WebChromeClient, except that Chrome on an…
crockpotveggies
  • 12,682
  • 12
  • 70
  • 140
0
votes
3 answers

Android progressbar on webview appearing twice

I'm trying to create a simple app for android with progress bar. Everything works fine. But, here two issues 1) When the application is launched i can see progress loading twice. 2) How can i disable the progress bar after the initial page is…
suraj jain
  • 1,012
  • 14
  • 26
0
votes
1 answer

Open javascript window into AlertDialog

In my app I've a webview displayed correctly. In the site there is a button that when clicked make a window.open() displaying some information. I've added a webchromeclient with the override of onCreateWindow method and add…
Luca
  • 31
  • 3
0
votes
1 answer

Calling activity methods from outside classes

I am really confused with all this application/activity context stuff. I want to call some of activity methods from classes, such as my own WebChromeClient or ConnectionChangeReceiver (detecting network connection changes). Example code: public…
Piotr
  • 1,743
  • 1
  • 26
  • 40
0
votes
1 answer

Unable to open the default file picker for using Xamarin and Webview to Android App

I am currently using the Xamarin to build a cross-platform mobile application. Basically my app only using the webview(The webview only opens a website that has a upload image function), for some extract features I have to use the webchromeclient…
0
votes
1 answer

Android back button from WebViewClient doesn't return to current Activity

I want to have a button press display a web page, I use the standard approach with a WebViewClient and WebChromClient like so: final Button revsButton = (Button) this.findViewById(R.id.buttonReviews); revsButton.setOnClickListener(new…
Alan Moore
  • 6,525
  • 6
  • 55
  • 68