Monday, October 3, 2016

I'm looking for away to "bypass" the 8 codes zip parsing of the android system, so they can not detect you, specialy on google maps (that's another part of the question ...the very common e beacon or trace cookie...) so the idea is to decompress any zip from any app by reading it on a web string !

You might get a small performance boost from using shouldInterceptRequest instead of loadDataWithBaseUrl. That won't solve your block size problem but it will allow WebKit to start parsing your content before you've finished decompressing the whole thing.
The way you'd use it is:
class MyWebViewClient extends WebViewClient {
@Override
public WebResourceResponse shouldInterceptRequest (WebView view, String url) {
    // this method is *not* called on the UI thread, be careful to not touch UI classes.
    if (Uri.parse(url).getHost().equals(Uri.parse("file:///android_asset/..."))) {
        // This assumes you pass in the AssetManager to the MyWebViewClient constructor.
        InputStream is = assetManager.open(sFileName);
        ZipInputStream zipInputStream = new ZipInputStream(is); 
        return new WebResourceResponse("text/html", "UTF-8", zipInputStream);
    }
    return super.shouldInterceptRequest(view, url);
}
 
 
http://stackoverflow.com/questions/22259773/android-java-reading-file-from-zip-file-into-webview-string-why-zipinputstream 

No comments:

Man in the Rain