How to use WebView in Offline mode? Can I dynamically revoke permissions?

by Mariano Kamp » Wed, 21 Apr 2010 02:17:51 GMT


Sponsored Links
 Hi,

I am want to use JavaScript to process some HTML pages in the background.

WebView seems to be a great basis to do this. There is one issue though. I
don't want to display the web page and its images/stylesheets right away, so
it is a waste of bandwidth when the stylesheets and images are downloaded. I
am wondering how to tell WebView not to do that.

I tried WebSettings.setLoadsImagesAutomatically(false), but this still loads
the stylesheets. WebView.setNetworkAvailable(false) is more an information
for WebView than a switch. Overriding
WebViewClient.shouldOverrideUrlLoading(..) didn't work either.

Any idea how to do this?

One thing that works is not giving the app the required Internet permission.
Unfortunately it is not that simple, because at other times I want to
display the processed pages and then it should download the
images/stylesheets ;-( But still is there some way that I can use this
permission thing? Can I dynamically revoke the permission? For a single
thread or process?

Cheers,

Mariano

--



How to use WebView in Offline mode? Can I dynamically revoke permissions?

by Mariano Kamp » Wed, 21 Apr 2010 03:39:17 GMT


 >




Sounds good. I will try that.

--


Sponsored Links


Other Threads

1. Google Checkout Order System Not Updating

I'm not sure how many of you have noticed, but the reporting system of
Google Checkout has been broken since around noon on Friday. Orders
continue to display in the web interface, but any attempt to query for
orders via HTTP requests or exporting orders to .csv files only
returns updated information prior to 3/5/10. For example, if you had
50 sales yesterday and tried to access the orders via the notification
API or my exporting a spreadsheet, the request would return no
information.

I'm not even sure that the Google Checkout team is aware there is a
problem. I posted a message in the Google Checkout forum:

http://www.google.com/support/forum/p/checkout-merchants/thread?fid=57b72fe1ae70768a00048138098a14c5&hl=en

There has been no official response. I realize it was over the
weekend, but it's really starting to have a negative impact. If you
are a dev affected by this, please either post in the thread I linked
to or try to contact Google. If someone from Google actually reads
this, could you please try to make the relevant team aware of this
issue if they are not already?

-- 

2. Why can't I post

I really don't understand why I have not been able to post. I have decided
to start my own group. Thanks for the great reads, and I hope nobody treats
u as I have been treated.

sent on location from my Motorola Droid

--

3. Creating DEMO and FULL versions

4. Android, send me logs! - code library for detecting force-close and sending logs

5. Display images

6. java.lang.IllegalArgumentException: Illegal character in query when using posting data to a url

7. Will TCP Sockets work over cellular network?