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. Contact API new contact is invisible

I simply want create a new contact on a android 2.0 device. The
created contact must appear in the native contacts application of the
device.

I tried to add a new contact using the ContactManager sample from the
android sdk: 
http://developer.android.com/resources/samples/ContactManager/index.html

On our motorola mindstorm device the contact gets created but is not
visible in the native contacts appplication. It is only visible in the
ContactManager app if the option show invisible contacts is enabled.

How can i add a contact which is visible ?

If we use the old depricated api method
Contacts.People.addToMyContactsGroup() it will work.

-- 

2. How to get the Calendar application on emulator?

Hi,

        I am using "Calendar"  code from "mydroid".To get the application on
emulator i followed the steps below.

                          1>I make mydroid using "make" command.
                          2>Using "make sdk" command, i got the sdk.
                          3>Run the emulator by setting the
"android-sdk_eng.root_linux-
x86" sdk to eclipse.
                          4>Make both the "Calendar" and "CalendarProvider"
applications.
                          5>I installed both the .apk files on that
emulator.
           But i am not getting the "Calendar" application on emulator.
           After that i registered with my mail-id on emulator.It's added to
"contactsList".But not syncing with "Google Server".
          So,anyone can suggest me that "How to get an "Calendar"
application on emulator?".
                           Thanks in advance.



-- 
Thanks & Regards,
Haritha.P

-- 

3. I cant close emulator.

4. Service that can report my location all the time

5. zoom for gallery

6. Databases and Activity life-cycle (OnCreate --> onResume)

7. Contact suggestions