diff --git a/framework/project.properties b/framework/project.properties index 9fe04f3b..57bcb9ac 100644 --- a/framework/project.properties +++ b/framework/project.properties @@ -10,7 +10,7 @@ # Indicates whether an apk should be generated for each density. split.density=false # Project target. -target=android-19 +target=android-21 apk-configurations= renderscript.opt.level=O0 android.library=true diff --git a/framework/src/org/apache/cordova/CordovaWebView.java b/framework/src/org/apache/cordova/CordovaWebView.java index 9fc480ce..5323d087 100755 --- a/framework/src/org/apache/cordova/CordovaWebView.java +++ b/framework/src/org/apache/cordova/CordovaWebView.java @@ -50,6 +50,7 @@ import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebSettings.LayoutAlgorithm; import android.webkit.WebViewClient; +import android.webkit.CookieManager; import android.widget.FrameLayout; /* @@ -191,7 +192,14 @@ public class CordovaWebView extends WebView { settings.setJavaScriptEnabled(true); settings.setJavaScriptCanOpenWindowsAutomatically(true); settings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL); - + + // Enable third-party cookies if on Lolipop. TODO: Make this configurable + if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) + { + CookieManager cookieManager = CookieManager.getInstance(); + cookieManager.setAcceptThirdPartyCookies(this, true); + } + // Set the nav dump for HTC 2.x devices (disabling for ICS, deprecated entirely for Jellybean 4.2) try { Method gingerbread_getMethod = WebSettings.class.getMethod("setNavDump", new Class[] { boolean.class });