webview添加cookie有时失效

转载:http://code.walletapp.net/post/46414301269/passing-cookie-to-webview

Passing cookie to webview

In few following lines I will describe my solution, how to pass cookies from DefaultHttpClient to WebView component. I was following many tutorials, but cookies weren’t send to WebView properly (in my Android 2.2). After several experiments I found out that it is working, when we wait a little time between removeSessionCookie and setCookie methods. I don’t know why. But important is, that it is working right now for me.

Look at the following source code:

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859

阅读更多
个人分类: Android
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭