Questions tagged [android-webview-javascript]

24 questions
3
votes
1 answer

Render process crashing webview Android Pie (9)

Trying to load the HTML files from assets folder, app working fine up to Android v8.1 and getting crash in Android Pie (9) devices. Seems like WebView render process getting crash according the debug logs, finding the ways to resolve this issue.…
2
votes
1 answer

How to pass a string parameter to evaluateJavascript in android

I tried to pass a string parameter to the web app javascript code. It's failed while passing a variable with the string value. But it works when we hardcode the data. Please let me know what's wrong with this. Working hardcoded…
Malhotra
  • 221
  • 3
  • 13
2
votes
0 answers

"The key "target-densitydpi" is not supported." while Loading url in webVIew

am trying to launch a URl in webView But it is throwing an error like "The key "target-densitydpi" is not supported." I have tried adding setUseWideViewPort to webview but didnot work We also tried by adding below line to web source code but…
2
votes
1 answer

window.beforeunload called before WebViewClient.shouldOverrideUrlLoading

In the Android app with the WebView and WebViewClient configured, after the window.open(url, '_system') called from the js, the js event window.beforeunload is fired before the Android WebViewClient.shouldOverrideUrlLoading is called. Is this a…
Maksym Gontar
  • 22,765
  • 10
  • 78
  • 114
1
vote
0 answers

Remove sandbox attributes on the iframe tag

I have an iFrame tag in my Android Webview which is a live streaming embed. It was working fine for at least 2 years until last week. No changes where made prior, the iFrame loads correctly in other browsers except the Webview from my app. Every…
1
vote
2 answers

How to pass variable from java to javascript in Android webview?

I have already seen a similar question in stackoverflow, but I want a better explained answer to this question. I am new to android development and I am trying to figure out how to pass a variable in my java code to the javascript in index.html. Any…
1
vote
1 answer

Android Studio Webview (Java) - Is there a way to wait until a loading inside a web page is finished before loading url?

I'm trying to get some elements in a web page using webView.loadUrl(...);. However, I found out that there is a loading that "creates" these elements after the page is already loaded. So, I didn't find a way to get these. I tried to use…
1
vote
0 answers

Child webview has issues with the keyboard after it has been launched once from the parent webview

I'm developing an Android application that has 2 Activities. In one activity I have a webview (parent) that creates the child webview by using the WebChromeClient's onCreateWindow. On the web code side, I store the reference of window.open() that…
1
vote
0 answers

Android webview not sending geolocation to javascript

I am writing an application that get the user's location and send it to the server. I am using JavaScript and PHP for the server side. I am trying to load this app on android WebView and it not sending the location to JavaScript so that the location…
1
vote
2 answers

Android Webview EvaluateJavascript sometimes does not return a response

I have been trying to fix this for weeks and have no clue what is causing the issue. In my project I am utilizing the Android Webview's evaluateJavascript() method like this: this.runOnUiThread(new Runnable() { @Override public…
0
votes
0 answers

Notification API support in android webview

I'm unable load particular url in my webview and getting blank white screen. When I load same url in chrome and chromium, url is loading properly and web notification is displaying like below screenshot. I seen following error message in…
0
votes
0 answers

When onRenderProcessUnresponsive is called?

I'm wondering when the WebViewRenderProcessClient.onRenderProcessUnresponsive() method is triggered in the app using Android Webview and how to test it. When I let my website hang by JS like while(true) {} the whole app becomes unresponsive (and…
Alexey Ozerov
  • 1,398
  • 13
  • 23
0
votes
0 answers

Download Image from Webview with blob:URLS in kotlin android

I have tried Download Blob file from Website inside Android WebViewClient and similar others. But not worked. Getting error in console like "Not allowed to load local resource: blob:https:" fun getBase64FromBlobUrl(blobUrl:String):String{ …
0
votes
0 answers

How to receive file object from android in webview environment? (web developer side question)

We are web developers and it is first time for us to make react webview project. And it is first time for our Android developer, as well. So we have faced a problem about receiving file from Android. Although I added input tag(type="file") and…
0
votes
0 answers

Open url in parent webview with out creating a new webview in android

I have an webpage which contain login button in it, On click of this login button it's opening new tab in Chrome. I tried to load this webpage in my Webview, like in below code. @Override public boolean onCreateWindow(WebView parentWebView,…
1
2