Hi,

In 3.0 (API level 11) there is this great addition for the WebViewClient: 
shouldInterceptRequest. This method returns custom content for a WebView's 
resource loads.

On Android there is the CacheManager. But is use is poorly documented, and it 
is deprecated.

I keep getting a NullPointerException in saveCacheFile because the code assumes 
that CacheResult outpustream != null, for the following example:

InputStream is = new ByteArrayInputStream("function callIt(){ 
alert('Hi');}".getBytes());

CacheManager.CacheResult cache_result = new CacheManager.CacheResult();

cache_result.setInputStream(is);

CacheManager.saveCacheFile("http://some.path/some_file";, cache_result);

This is happening running Android 2.2 on my LG Optimus and in the emulator.

Can we get shouldInterceptRequest already? :-)



Thanks,

Philippe Laporte

________________________________
-----------------------------------------------------------------------------------------
This email may contain confidential and privileged material for the sole use of 
the
intended recipient(s). Any review, use, distribution or disclosure by others is 
strictly
prohibited. If you are not the intended recipient (or authorized to receive for 
the
recipient), please contact the sender by reply email and delete all copies of 
this
message.

To reply to our email administrator directly, please email 
[email protected]
-----------------------------------------------------------------------------------------

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to