Questions tagged [android-websettings]

Use this tag for questions regarding managing settings state for a WebView on the Android OS

142 questions
1
vote
3 answers

Webview URL redirects/changes when launch tablet

I'm using webview in my application and giving hardcoded URL using the code. All things are working perfectly fine, but one thing came across when I was testing it on 10.1" tablet. The URL which I have provided works fine with the phone but on…
Anupam
  • 3,742
  • 18
  • 55
  • 87
1
vote
4 answers

Android Webview - Custom HTML

How can I show my custom HTML code if there is no data connection on the phone? Custom HTML code: String customHtml = "Hello, WebView"; webView.loadData(customHtml, "text/html", "UTF-8"); Here is my full code: package…
user1273409
  • 39
  • 3
  • 9
0
votes
3 answers

What view should be use to load the static local html file?

In my appplication i have to load the abc.html file in to specific layout. So for that which view i have to use ? Should i WebView is fine. or there is anyother View that load that local html file fast. Note: the Html file is not loading from the…
Shreyash Mahajan
  • 23,386
  • 35
  • 116
  • 188
0
votes
1 answer

How to scale target webpage linked with parse

I have a program with a button to login via GET method, it works perfectly, but when I log in, the form appears zoomed out far and little. I wanted to know if there is any option with WebSettings.ZoomDensity, or WebView class, to scale the form size…
Franco
  • 35
  • 1
  • 3
  • 10
0
votes
1 answer

Android webview add header to each request without using shouldInterceptRequest

I want to add my header to each request in webview but I dont want recreate the request using OkHttp or DefaultHttpClient since WebResourceRequest from shouldInterceptRequest does not return the request body so my POST requests wont have value when…
0
votes
1 answer

How to invoke Webview button clickevent in Android?

I am developing an android app with a web app loading on WebView. I want to invoke the web app button actions. I have implemented some changes on webpage to invoke native methods as shown below. mWebview.addJavascriptInterface(new Object() { …
0
votes
0 answers

Android Webview freezes when clicked on webpage

My app has a webview for loading different shopping sites, all links are loading correctly and i can interact with the webpage without any problem except for one; https://www.jiji.ng/, this link work correctly in other browsers installed on my phone…
Akinyemi Jamiu
  • 431
  • 3
  • 10
0
votes
1 answer

Android webview : Show the default JS popup for web page access authentication

This is a screenshot from google chrome. When I try to access a page with basic authentication, this authentication dialog is shown. I want this feature be enabled in my android Webview as well and let the user enter their username and password. But…
viper
  • 1,836
  • 4
  • 25
  • 41
0
votes
2 answers

Android webview with parameters not working as expected

I am calling the javascript function from the android app with two parameters. first one is the boolean and the second one is a string value. But it's not behaving as expected. Please let me know if anything wrong with my…
0
votes
1 answer

Webpage is showing for 2 seconds before Activity

I am loading a web app from my android application. In the initial load of URL, it will redirect to the login page and after login, it will move to the web app home screen. But the expected behaviour is to redirect it to Native Homescreeb after…
0
votes
2 answers

Unable to load fast.com in webview

I want to create a simple app with a few useful webview links but fast.com will not load webView.loadUrl("https://fast.com"); I've tried most webSettings but nothing works. What am I doing wrong?
Brenton
  • 35
  • 11
0
votes
1 answer

How to clear Webview Cache from Another activity

I have a fullscreen Webview in Activity A and I have a clear button on Activity B to clear the Webview cache. How can I call that Webview clear functionality from another activity? Tried the below scenario but it crashed because Webview will be null…
0
votes
1 answer

Show base64 string PDF in a Webview in Android

I am getting base64 data from the server. I want to show that in a Webview. Tried the below methods but not working web_pdf.loadData(decodedContent.toString(), "application/pdf", "charset=UTF-8"); Any suggestions!
Malhotra
  • 221
  • 3
  • 13
0
votes
1 answer

Android webview asks for chooser popup

I am trying to load the .pdf file in the webview, but it shows below popup How to cancel this popup in Android webview. Please help
Anbu
  • 671
  • 1
  • 6
  • 18
0
votes
1 answer

Dynamic images won't load, shows up as text/html MIME type, fix for webview?

For example, a link for one of the images goes to a url https://storage.notmywebsite.com/some/path/on/website/image:Static,Small/ImageFileName?params=123456. When degbugging webview via chrome://inspect, the kind of error that shows up is…