I am trying to get local cookies (file://) to work on android 3.1+ within ChildBrowser. I found a blog response talking about this specific issue and how to remedy it with Cookie Manager. I can't figure out where in the plugin to put the code. Has anyone successfully implemented this?
Comment Below from http://code.google.com/p/android/issues/detail?id=3739
Comment 16 by [email protected], Feb 1, 2012 I got this thing working, for Android 2.2, javascript's document.cookie works fine, just make sure that in your Webview...javascript is enabled like so:
yourWebViewVariable.getSettings().setJavaScriptEnabled(true);
for Android 3.1 just add this to your java file onLoadInit:
CookieManager.setAcceptFileSchemeCookies(true); //This is the line that specifically makes it work so the other lines is optional
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.setAcceptCookie(true);
cookieManager.acceptCookie();