Hi

im developing a native application on android with some webviews and i use
for them a crosswalk
I would like to intercept a request sent by the webview
with shouldInterceptLoadRequest
like this

 XWalkView xWalkWebView = (XWalkView)
rootView.findViewById(R.id.xwalkWebView);
 xWalkWebView.setResourceClient(new XWalkResponceClient(xWalkWebView));

xWalkWebView.load("file:///android_asset/index.html", null);

class XWalkResponceClient extends XWalkResourceClient {
    public XWalkResponceClient(XWalkView view) {
        super(view);
    }

    @Override
    public void onLoadFinished(XWalkView view, String url) {
        super.onLoadFinished(view, url);
    }

    @Override
    public boolean shouldOverrideUrlLoading(XWalkView view, String url){
        if(url.startsWith("zoom:")){
            ....
            return true;
        }
        return false;
    }

    @Override
    public WebResourceResponse shouldInterceptLoadRequest(XWalkView view,
String url) {
        Log.d(TAG, "req: "+url);
        return super.shouldInterceptLoadRequest(view, url);
    }
}


but I can track this request only if the url is outside from my app (like
www.google.com)
if the page is on my app (like asset directory), the request cannot be
tracked
is there any solution to avoid this?




-- 
Leorsini Daniele
www.leorsini.it
http://www.linkedin.com/in/leorsini
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help

Reply via email to