android-webview

Android: How to reference asset images from a remotely loaded html page in webview

Hello, I'm trying to load/reference images from the app's assets folder from within a HTML page in a WebView. Unlike in most of the examples the HTML page itself is not located in the assets folder but is loaded from a server via http. The background of this question are some performance improvements which should reduce the loading time...

Why isn't my WebView filling up the entire width of my screen?

My WebView doesn't fill the entire width of my phone. I am telling to fill_parent. Not sure why? <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizonta...

Smaller APK size with large assets?

I am creating a simple android app to view a comic book. The pages are large(0.5-1 mb each), high quality .png's and I am loading them into a webview to make use of the built in zoom controls. So far I only have 17 files and the APK size is already about 16 mb. I'm looking to add over 200 files in future updates. I can't really reduce th...

WebView displays .pkg file instead of downloading it

Hi all I need some help here I have gone through the tutorial for WebView and I get it to load my url and it loads fine. I run a site that offers .pkg files to my users for download to there device. The issue is instead of downloading the .pkg file it just displays the raw code of the .pkg file in the webview. How can I get this to force...

Android: How to Invoke skype from WebView?

Hi, I need to invoke skype application and make a call from skype when a 'skype me' link (eg: skype://1866012345) is clicked from a webview. Can someone help how to do this? I tried the following: Downloaded skype application from market (in my driod 2.2). When launching skype, the package invoked is 'skype.android.raider' - as per AD...

Images in a web view on a Motorola Droid. What size?

I am developing a Java Android application that displays web content from the assets folder in a web view. I had no problem getting this content to display in the application but I am confused as to why my images are not displaying properly. I'm working with a Motorola Droid that is supposed to be 480x854 resolution. When I create banner...

Adding a progress bar to webview

Hi, I have been trying to put a back button progress bar in a webview and keep the url loading within my app instead of using the android default web browser. If I manage to keep to browsing within the app and keep the back button the progress bar never shows up if I manage to get the progress bar to show up the code at the bottom for ...

Adding progress dialog to webview problem

Hi, I have been messing around with the webview function trying to add a progress bar to the webpage when it is loading. I have added a progress dialog for the transition to the webpage but now I want to add a progress bar to the webpage everytime the user clicks a link, I have tried adding different code but cannot get anything to wor...

Android WebView leaves space for scrollbar

In my WebView, I have some block elements that have a background color (different than white). However, the background color does not go all the way across the sky.. um, screen. Instead, it leaves a small white strip to the right, for where the scrollbar would go. Now, I want the scrollbars to appear only when scrolling (and fade away on...

gmail.com not working on webview (after login)

I have a webview in my app that generally works fine for loading websites. But I cannot get www.gmail.com to work: when I open www.gmail.com I see the login page, try to login, afterwards the screen goes black and my app/process is killed. I don't see much in my logcat, just some strange debug information is being dumped as below. But ...

Android JNI OpenGL crashing while used with WebViewClient.

Hello, I'm porting an application from iPhone to Android. This application uses a webpage as a menu, and then switch to an opengl surface for rendering. All is working fine on the iPhone, but on android, it randomly crashes. The OpenGL surface uses JNI for rendering. What I'm doing is I'm adding the WebClientView on top of the Ope...

Problem with loading existing .html file with android WebView

Hi everyone, Firstly, happy birthday! I did try samples, demos from Google codes and other resources with WebView, but when i try to do it in my own code, it doesn't work for me. I want to load myfile.html which i put in assets folder, and using: private WebView myWebView; myWebView.loadUrl("file:///android_assets/myfile.html); On ...

Android WebView Download Listener

Hi.. Did anyone know how to get the full url to the content that should be downloaded in webview. I notice there is setDownloadListener (DownloadListener listener) method where we can get the url onDownloadStart method. But i have problem when i open page A, i click hyperlink in page A and directly open a new page B. In page B i downlo...

Save text from webpage to String variable

Hello! I want to save something from a webpage (loaded into webview) into a Java variable. Is that possible? Example: I have a webpage with written text: HELLO STACK!. How could I save that text into Java var (String foo = ?????)? Could I do it with JavaScript/Java cooperation? ...