android - How to handle a binary data response in WebView -
my activity has intent filter pick specific url , open in webview control, brings user auth page (user name/password). after authentication done user binary stream response (file). there way handle response , read data stream?
i tried setup custom webviewclient overridden shouldoverrideurlloading method, app doesn't there.
@override mmywebview.setwebviewclient(new customwebclient()); mmywebview.loadurl("http://xxx.xx.x.xx:xxxx/getcert"); ... private class customwebclient extends webviewclient { @override public boolean shouldoverrideurlloading (webview view, string urlconection) { // break point here doesn't stop debugger return true; } }
neither works
mmywebview.setwebviewclient(new webviewclient(){ @override public boolean shouldoverrideurlloading (webview view, string urlconection) .... });
server reacts on requests in same way both app , build-in browser. build-in browser starts download file received in response, app doesn't , doesn't hit breakpoint inside customwebclient. separate app test piece nothing else interferes it. internet & write_external_storage permissions added.
edit: mar 8 gave up. go httpclient.
did implement method of webview?
void setdownloadlistener(downloadlistener listener) register interface used when content can not handled rendering engine, , should downloaded instead.
Comments
Post a Comment