android - share session between two webviews?

戏子无情 提交于 2019-12-05 19:24:19

As far as I know, you don't need to set cookie for webview2. webview2 will automatically use the cookies from webview1.

CookieManager seems to be a singleton, so when you call getInstance() you always get the same instance. So if webview 1 set some cookies on the CookieManager, or if you set it your self using set Cookie, all other webviews should get the same cookies as well.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!