Using Cookies across Activities when using HttpClient

后端 未结 6 1845
孤独总比滥情好
孤独总比滥情好 2020-12-04 15:43

I\'m trying a simple app to read in the HTML of a website, and tranform it to create an easily readable UI in Android (This is an exersize in learning android, not to make a

6条回答
  •  Happy的楠姐
    2020-12-04 16:34

    A good solution for the cookie storage would be to follow the ThreadLocal pattern in order to avoid storing cookies randomly.

    This will help keeping a one and only CookieStore. For more explanation of this pattern, you can follow this useful link.

    http://veerasundar.com/blog/2010/11/java-thread-local-how-to-use-and-code-sample/

    Cheers

提交回复
热议问题