Are cookies not being stored in Prime31's Etcetera plugin webview?

There’s a webview in my app that allows users to log in, which is closed when you do it successfuly. Then you keep using the app, until you get to a section that requires another webview… and for some reason the app forgets you were already logged in.

I’m using the same plugin in iOS and cookies / sessions do work there (that is, the same app works properly on iOS with the iOS Etcetera plugin). But on Android it seems that webview cookies / sessions are not being stored. Is that so? If so, can I change that behaviour?

I found out at StackOverflow that, apparently, a new browser is opened whenever webview is invoqued. But that renders the plugin (at least the webview) pretty useless if you want to keep things working during a given app session… java - WebView and Cookies on Android - Stack Overflow

Has anyone faced the same issue?

Ok, it’s not the plugin. It seems it’s the way I’m using it, www and the server. And it seems it all behaves different in Android than it does in iOS.

Apparently, an iOS app and its webview share cookies, or so it seems because it all works in iOS. But not in Android. Cookies are there, I can see them while in a webview in javascript:

function printcookies(){
  alert("Cookies");
  var pairs = document.cookie.split(";");
  var cookies = {};
  for (var i=0; i<pairs.length; i++){
    var pair = pairs[i].split("=");
    alert(pair[0] + " " +  unescape(pair[1]));
  }
}

But whenever I send something from the app to the server via www, cookies are not present.

No idea how I’m gonna fix this, but I just wanted to share it.