android - Keep url session cookie between sessions -
i having intentservice handles network communication. need problem between network calls intentservice runs out of work , result of shuts down , deletes session cookie. have found old solution (coockiesyncmanager), depricated now. question is: how store session cookies between sessions?
is there maybe option store session in sharedpreferences?
here follows little code snippet:
cookiemanager = new cookiemanager(); cookiehandler.setdefault(cookiemanager); url url = new url(url_root + uuid); connection = (httpsurlconnection)url.openconnection();
you can try apache defaulthttpclient work you, don't think been changed in ice cream sandwich.
i found sample there lots more in here
http://www.vogella.com/tutorials/apachehttpclient/article.html
this work... overriding
webviewclient.shouldoverrideurlloading
to use apache dedfaulthttpclient acquire webpage using cookies , inject html webview webview.loaddata (meaning, handle logic , webview used displaying/rendering html)
Comments
Post a Comment