i have development a android app with web view but sometimes it opens the help center for cookies:
this is my configuration:
webSettings = webview.getSettings();
webSettings.setJavaScriptEnabled(true);
webSettings.setJavaScriptCanOpenWindowsAutomatically(true);
webSettings.setDomStorageEnabled(true);
webSettings.setAllowFileAccess(true);
webSettings.setAllowContentAccess(true);
webSettings.setCacheMode(WebSettings.LOAD_CACHE_ELSE_NETWORK);
webSettings.setGeolocationEnabled(true);
webSettings.setSaveFormData(true);
how can i prevent this from happening?
CodePudding user response:
Add this line after initialize your webview
CookieManager.getInstance().setAcceptCookie(true);