[英]how to disable cookie pop up in webview android java? is there any way to block this pop up or accept cookie by default in background
Is it possible to stop web view to take cookies, or how can I edit java script code before loading into web view in android java. Is it possible to stop web view to take cookies, or how can I edit java script code before loading into web view in android java. If there is any way please mention, or if there is any way to edit the java script code also如果有任何方法请提及,或者是否有任何方法可以编辑 java 脚本代码
Try this:尝试这个:
Add this line of code before you initialize your Webview: CookieManager.getInstance().setAcceptCookie(true);
在初始化 Webview 之前添加这行代码: CookieManager.getInstance().setAcceptCookie(true);
That should solve your problem.那应该可以解决您的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.