[android-developers] Re: How do I save a complete webpage displayed in Android's WebView?

2012-06-20 Thread gjs
Hi, No quite what you are looking for but you can save the entire (rendered) web page as an image to view offline. See a very old post of mine that show how to do this, in older versions of Android - https://groups.google.com/group/android-developers/browse_thread/thread/5bab2668cd5ab44f/81651c

Re: [android-developers] Re: How do I save a complete webpage displayed in Android's WebView?

2012-06-20 Thread imsproject ims
Hi Nobu Games, Thanks for your reply. I will try using javascript as you mentioned. Thanks, On Wed, Jun 20, 2012 at 6:10 PM, Nobu Games wrote: > I just found a simpler example without JavaScript to Android interface: > > http://lexandera.com/2009/01/extracting-html-from-a-webview/ > > Above li

Re: [android-developers] Re: How do I save a complete webpage displayed in Android's WebView?

2012-06-20 Thread Nobu Games
I just found a simpler example without JavaScript to Android interface: http://lexandera.com/2009/01/extracting-html-from-a-webview/ Above link also shows how to implement your own WebViewClient class to control some basic WebView behavior. -- You received this message because you are subscrib

Re: [android-developers] Re: How do I save a complete webpage displayed in Android's WebView?

2012-06-20 Thread Nobu Games
Oh my, JavaScript indeed slipped my mind for a second. But this is also not the only problem because a lot of web pages are generated on a per-user basis, so one and the same URL won't look like the same on another client (think of logins). Anyway. You could inject JavaScript into the WebView t

Re: [android-developers] Re: How do I save a complete webpage displayed in Android's WebView?

2012-06-20 Thread imsproject ims
Hi Nobu Games, Thanks for your reply. However I already tried using the user-agent string returned by Android to download content from URL. This however did not work since the returned webpage says that javascript is not enabled on your browser. I tried on url: www.techcrunch.com and www.cnet.com.

Re: [android-developers] Re: How do I save a complete webpage displayed in Android's WebView?

2012-06-20 Thread Nobu Games
You can retrieve the user agent stringfrom the WebView. Add that string as a user agent header to your request -- You received this message because you are subscribed to the Google Groups "Android D

Re: [android-developers] Re: How do I save a complete webpage displayed in Android's WebView?

2012-06-20 Thread imsproject ims
Hello, Thanks for your reply. However using of HTTP GET request does not download the exact content that you will see on the WebView. Many websites especially technical article sites, send content based on the browser and whether JavaScript is enabled or not. Is there any other way of achieving thi

Re: [android-developers] Re: How do I save a complete webpage displayed in Android's WebView?

2012-06-20 Thread imsproject ims
You are right. Also the public API for saving as web archive is only available only for Android 3.x onwards. So parsing the archive is not an option. Is there any other way to save the html content displayed in a WebView? Thanks, On Wed, Jun 20, 2012 at 12:36 PM, Doug wrote: > I don't think you

[android-developers] Re: How do I save a complete webpage displayed in Android's WebView?

2012-06-20 Thread Nobu Games
Write your own HTTP GET request component that downloads a web page, parses the HTML and searches it for linked documents and resources and download these. Maybe you'll find ready-made website crawler components on the web because this is a non-trivial task with lots of pitfalls like recursion

[android-developers] Re: How do I save a complete webpage displayed in Android's WebView?

2012-06-20 Thread Doug
I don't think you can do this with documented public APIs. I wouldn't go reaching into that cache folder unless you have a very clear understanding of how that works in all versions of Android that you need to work with. Doug On Wednesday, June 13, 2012 11:55:53 AM UTC-7, VP wrote: > > I am de