I have an app that is trying to log into a site and get the cookie then show me the cookie in a toast but most of the time it fails to get the cookie, is there some timeout issue here or something im hitting?
here is my code public void showPage(){ try{ String server = settings.getString("server", ""); String user = settings.getString("username", ""); String passwd = settings.getString("passwd", ""); WebView webview = new WebView(this); WebSettings webSettings = webview.getSettings(); webSettings.setJavaScriptEnabled(true); setContentView(webview); String credUrl = "http://"+server+"/services.php?sname=LoginService&username="+user+"&rawpassword="+passwd; CookieSyncManager syncMgr = CookieSyncManager.createInstance(webview.getContext()); CookieSyncManager.getInstance(); CookieManager cookieManager = CookieManager.getInstance(); String rawCookie = cookieManager.getCookie(credUrl); mes(rawCookie); }catch(Exception e){ mes("err3: "+e.toString()); } } -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en