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. Connectivity Manager NetworkInfo getState

So when I use ConnectivityManager and get a list of Networkinfo using
getAllNetworkInfo(), for the mobile NetworkInfo it is Connected on the
emulator but Unknown when it is on a real phone. Does anyone know why?

-- 

2. As Gingerbread Bakes, 73.8% of Android Phones Run 2.1+

http://goo.gl/kJmB


-- 

3. Touch Screen - No response

4. Play VideoView in LandScape Mode

5. can not find - .so shared library

6. How to avoid screen become block when change locale

7. Wakeup alarm logging