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.

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 that is used in Ionic

WebView class reference for macOS (deprecated)

webview tag reference for Chrome apps

WebView: a Node that displays WebEngine content.

21017 questions
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
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
  • 2,789
  • 4
  • 22
  • 33
123
votes
10 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,255
  • 2
  • 9
  • 3
121
votes
15 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
  • 8,543
  • 3
  • 31
  • 51
120
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}:…
115
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,515
  • 4
  • 22
  • 30
113
votes
21 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,539
  • 5
  • 17
  • 20
107
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,040
  • 22
  • 74
  • 121
98
votes
14 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,171
  • 1
  • 8
  • 13
98
votes
7 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
  • 3,664
  • 4
  • 18
  • 17
97
votes
14 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
  • 971
  • 1
  • 7
  • 3
95
votes
15 answers

detect ipad/iphone webview via javascript

Is there a way to differ via javascript if the website runs inside the ipad safari or inside an application WebView?
sod
  • 3,506
  • 2
  • 19
  • 26
92
votes
16 answers

Android WebView Cookie Problem

I have a server that sends my android app a session cookie to be used for authenticated communication. I am trying to load a WebView with a URL pointing to that same server and I'm trying to pass in the session cookie for authentication. I am…
nannerpus
  • 1,375
  • 1
  • 11
  • 11
91
votes
2 answers

Favourite content is not shown correctly on webview

I'm developing a language dictionary app. I save the favourite word into Preference. The Favourite content in the XML file looks like the following:
Niamh Doyle
  • 1,869
  • 6
  • 29
  • 41
86
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
  • 2,761
  • 4
  • 16
  • 27