Questions tagged [webview]

Elements in graphical user interfaces that host HTML content. For Android, look at the android-webview tag. For iOS, look under uiwebview or wkwebview. For VS Code, look under vscode-webview.

A user interface element that displays web pages. Generally, it is the basis upon which you can roll your own web browser or simply display some online content within your application.

: WebView class reference for Android

: WKWebView class reference for iOS

: UIWebView class reference for iOS (deprecated)

: Webview API for Visual Studio Code

: WebView that is used in Ionic

WebView class reference for macOS (deprecated)

webview tag reference for Chrome apps

WebView: a Node that displays WebEngine content.

22469 questions
140
votes
16 answers

Android Webview - Completely Clear the Cache

I have a WebView in one of my Activities, and when it loads a webpage, the page gathers some background data from Facebook. What I'm seeing though, is the page displayed in the application is the same on each time the app is opened and…
Matt Gaunt
  • 9,434
  • 3
  • 36
  • 57
136
votes
12 answers

How can I display a pdf document into a Webview?

I want to display pdf contents on webview. Here is my code: WebView webview = new WebView(this); setContentView(webview); webview.getSettings().setJavaScriptEnabled(true);…
shriya
  • 1,385
  • 2
  • 9
  • 3
131
votes
22 answers

Android Webview - Webpage should fit the device screen

I have tried the following to fit the webpage based on the device screen size. mWebview.setInitialScale(30); and then set the metadata viewport
SWDeveloper
  • 1,749
  • 5
  • 18
  • 20
128
votes
3 answers

Cannot display HTML string

I am struggling with display string HTML in Android WebView. On the server side, I downloaded a web page and escape HTML characters and quotes (I used Python): my_string = html.escape(my_string, True) On the Android client side: strings are…
Hoa Vu
  • 2,865
  • 4
  • 25
  • 33
125
votes
13 answers

WebView and HTML5

I'm piecing together a cheapo app that amongst other things "frames" some of our websites... Pretty simple with the WebViewClient. until I hit the video. The video is done as HTML5 elements, and these work fine and dandy on Chrome, iPhones, and…
brian moore
  • 1,263
  • 2
  • 9
  • 6
123
votes
4 answers

NameNotFoundException webview

I am getting errors from Crashlytics that indicates that some devices are missing com.google.android.webview. How is that even possible? java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp.app/com.myapp.ReaderActivity}:…
123
votes
1 answer

dequeueBuffer: can't dequeue multiple buffers without setting the buffer count

I'm getting the error below on Android 4.4.2 Moto X 2013 in a Rhomobile 5.0.2 WebView app. The app is compiled with SDK 19 and minAPI 17. After some research it seems that this is an issue with Snapdragon 800 / Adreno GPU devices: here and here are…
fnllc
  • 3,047
  • 4
  • 25
  • 42
111
votes
9 answers

Android. WebView and loadData

It's possible to use following method for content's setting of a web-view loadData(String data, String mimeType, String encoding) How to handle the problem with unknown encoding of html data?! Is there a list of encodings?! I know from my college…
Tima
  • 12,765
  • 23
  • 82
  • 125
110
votes
8 answers

How to force keyboard with numbers in mobile website in Android

I have a mobile website and it has some HTML input elements in it, like this: I have embedded the site into a WebView for possible Android 2.1 consumption, so that it will also be an Android…
ncakmak
  • 4,014
  • 5
  • 20
  • 17
109
votes
16 answers

Android WebView not loading an HTTPS URL

public void onCreate(Bundle savedInstance) { super.onCreate(savedInstance); setContentView(R.layout.show_voucher); webView=(WebView)findViewById(R.id.webview); webView.getSettings().setJavaScriptEnabled(true); …
sumit
  • 1,091
  • 2
  • 8
  • 3
108
votes
15 answers

How to change font face of Webview in Android?

I want change the default font of webview to a custom font. I'm using webview in developing an bilingual browser app for Android. I tried getting an instance of custom typeface by placing my custom font in assets. But still couldn't set webview's…
Dhanika
  • 1,271
  • 2
  • 9
  • 13
103
votes
12 answers

JavaScript not working in Android Webview?

I'm trying to make an Android version of a relativly simple iOS app that uses a webview, some buttons and then relies on javascript calls to a CMS. But I'm stuck at a pretty early point of development: The webview doesn't function with…
David K
  • 3,153
  • 5
  • 18
  • 27
103
votes
16 answers

detect ipad/iphone webview via javascript

Is there a way to detect with JavaScript if the website runs inside the iPad's Safari or inside an application WebView?
sod
  • 3,804
  • 5
  • 22
  • 28
103
votes
1 answer

Android Webview: "Uncaught TypeError: Cannot read property 'getItem' of null"

I am creating a simple android app which has a webview which should display a url. When I give the url as google.com or facebook.com it loads properly but when I give my url(qbo.intuit.com), it doesn't load and gives the "Uncaught TypeError: Cannot…
Sonal
  • 1,188
  • 2
  • 8
  • 10
101
votes
6 answers

Download file inside WebView

I have a webview in my Android Application. When user goes to webview and click a link to download a file nothing happens. URL = "my url"; mWebView = (WebView) findViewById(R.id.webview); mWebView.setWebViewClient(new…
Jay Mayu
  • 17,023
  • 32
  • 114
  • 148