diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 201b1711..90698878 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -15,14 +15,12 @@
-
-
-
+
+
-
@@ -39,11 +37,11 @@
-
+
-
-
+
+
@@ -54,8 +52,8 @@
-
-
+
+
@@ -63,34 +61,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -102,10 +72,6 @@
- shouldOverrideUrlLoading
- toolbarTopFixedTitle
- useChromeSafariBrowser
- toolbat
onProgress
goBack
_controller
@@ -132,6 +98,10 @@
loadData
_valide
initialized
+ HashMap
+ headers
+ .cast
+ WebView
activity.getPreferences(0)
@@ -175,9 +145,9 @@
-
-
+
+
@@ -211,6 +181,7 @@
+
@@ -222,7 +193,6 @@
-
@@ -390,9 +360,9 @@
-
+
-
+
@@ -408,7 +378,7 @@
-
+
@@ -646,38 +616,12 @@
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -692,40 +636,39 @@
-
+
-
-
+
-
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/MyCookieManager.java b/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/MyCookieManager.java
index 7717a56c..1bb9e9fa 100644
--- a/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/MyCookieManager.java
+++ b/android/src/main/java/com/pichillilorenzo/flutter_inappbrowser/MyCookieManager.java
@@ -1,15 +1,15 @@
package com.pichillilorenzo.flutter_inappbrowser;
import android.os.Build;
-import android.text.TextUtils;
import android.util.Log;
import android.webkit.CookieManager;
import android.webkit.ValueCallback;
import java.net.HttpCookie;
-import java.net.MalformedURLException;
-import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;
@@ -44,6 +44,9 @@ public class MyCookieManager implements MethodChannel.MethodCallHandler {
MyCookieManager.setCookie(url, name, value, domain, path, expiresDate, isHTTPOnly, isSecure, result);
}
break;
+ case "getCookies":
+ result.success(MyCookieManager.getCookies((String) call.argument("url")));
+ break;
default:
result.notImplemented();
}
@@ -70,9 +73,8 @@ public class MyCookieManager implements MethodChannel.MethodCallHandler {
if (expiresDate != null)
cookieValue += "; Max-Age=" + expiresDate.toString();
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
- if (isHTTPOnly != null && isHTTPOnly)
- cookieValue += "; HttpOnly";
+ if (isHTTPOnly != null && isHTTPOnly)
+ cookieValue += "; HttpOnly";
if (isSecure != null && isSecure)
cookieValue += "; Secure";
@@ -93,4 +95,24 @@ public class MyCookieManager implements MethodChannel.MethodCallHandler {
}
}
+ public static List