Android how to pass google account to webview -


i using webview show google canlender want pass google account programmatic-ally,so sethttpauthusernamepassword() function should need doesn't work @ all. here code:

webview webview = (webview) findviewbyid(r.id.webview); webview.getsettings().setjavascriptenabled(true); webview.sethttpauthusernamepassword("www.google.com", "", "email", "password");      webview.setwebviewclient(new webviewclient() {         @override          public void onreceivedhttpauthrequest (webview view, httpauthhandler handler, string host,string realm){              handler.proceed("email","password");              }         }           public void onreceivederror(webview view, int errorcode, string description, string failingurl) {             toast.maketext(activity, description, toast.length_short).show();         }     });      webview.loadurl("http://www.google.com/calendar/"); 

if have idea make worked, please let me know. tried search lot don't see useful.

you're trying use http authentication (http://en.wikipedia.org/wiki/basic_access_authentication) not supported web services. need have valid google cookies, set when manually sign in password.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -