Tag: webview

Android – Drawing to a PDF canvas from WebView

I’ve been having troubles getting PDF printing work on Android. What I’m trying to do is render some HTML in WebView, then draw the WebView contents on a PDF canvas and finally write the PDF to a file. The problem I’m having is that when I draw to the PDF canvas the content gets clipped […]

Android WebView – Setting HTML Field focus using Javascript

I have an application with just a visible WebView component to it which is used to display some dynamically generated HTML (can run Javascript too). It’s enabled for the WebView. For a few pages I am trying to set the focus of one of the input text boxes after the page load has finished – […]

Android browser cuts the https:// scheme from complete qualifier

In my app, I show an external HTML site in either a CustomTabsIntent or a in a WebView: if (customTabsIntent != null) customTabsIntent.launchUrl(this, Uri.parse(“http://some.where.com/site.html”)); else startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(“http://some.where.com/site.html”))); But the style of that HTML is already updated, but my smartphone shows the old style (old fonts etc.). In the *.html file there is a *.css […]

Detect android webview URL location change

Does anyone else know how to track a sort of webview “onLocationChange”? iOS has something like this for its webview. PS – I am trying to see if I can use the phonegap childbrowser plugin on android to do facebook auth. I’m giving up and just using a facebook plugin I found that uses part […]

How to hide url in Chrome custom tab android

I have implemented new Chrome Custom Tab in android, I am using the following code to open Uri uri = Uri.parse(“https://akash.plobal.com/ploicy”); CustomTabsIntent.Builder intentBuilder = new CustomTabsIntent.Builder(); intentBuilder.setToolbarColor(Color.BLACK); intentBuilder.setShowTitle(true); intentBuilder.build().launchUrl(getActivity(), uri); I need to hide url below the title in toolbar

WebView hides soft keyboard during loadUrl(), which means a keyboard cannot stay open while calling javascript

Since the way you call javascript on a WebView is through loadUrl(“javascript: … “); The keyboard cannot stay open. The loadUrl() method calls loadUrlImpl() , which calls a method called clearHelpers() which then calls clearTextEntry(), which then calls hideSoftKeyboard() and then we become oh so lonely as the keyboard goes away. As far as I […]

CookieSyncManager is now deprecated, what can I use instead?

I’m using a cookie in my app which works fine in all browsers, but in android device the cookie is not setting as fast as I wanted, it takes some time until cookie is saved, same is happening when I delete the cookie. Is there anything I can do to make it work better? Thank […]

Destroy webview in Android

Fail To Destroy WebView Firstly, a lot of example i had been tried for destroy the webview in Android. For example: Memory Leak in Android Although i was destroying webview in the onDestroy() and declared a webview programmatically, but the memory leak problem also will be occurred in my Android device. Below is my coding.. […]

Logic to use multiple webview in TabLayout to handle memory issue

I have almost 30 webview in a Tablayout. Everything works fine but my app consumes a lot of memory and will just close because of memory issue. This is what I get in log 04-05 21:00:09.458 19720-19801/com.example.choman.webview A/chromium: [FATAL:memory.cc(19)] Out of memory. size=16777216 This is my java file. Basically all the remaining 29 fragments contain […]

Open url in webview – phonegap

I would like to know how can I open an url in the app context of embed webview. Currently this demo will open a new tab in external browser, so, not what I am expected. I am using google.com just for testing. Summary, I am looking for a functional demo. <?xml version=”1.0″ encoding=”UTF-8″?> <!– config.xml […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.