java - download file from google sites in an android application programatically -


i need download file google sites, made private ( which: "only people listed below can access" ). when make accessible ( without user , pass authentication ), download e.g. code:

url = new url("https://user:pass@sites.google.com/site/abc/def.txt"); httpsurlconnection conn = (httpsurlconnection) url.openconnection(); conn.setreadtimeout(7000 ); conn.setconnecttimeout(7000 ); conn.setrequestmethod("get"); conn.connect();    inputstream stream = conn.getinputstream(); return stream; 

... when set private option, e.g. authenticated user able see it, not able download app. able see browser same user , pass. i've tried basic authentication , url/http/https requests listed here:

using httpget returning complete html code how http authentication in android? how respond http authentication challenges in android etc... of them, request 200, , redirected login page ( inputstream login page ).


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -