It’s work finely in my testing.

Could you please try to get the cookies after loadUrl with following code:
new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                xwalkCookie = cookieManager.getCookie("http://www.baidu.com";);
                Log.d("fujunwei", "=====the cookie = " + xwalkCookie);
            }
        }, 2000);

Thanks,
Junwei.
From: Crosswalk-help 
[mailto:[email protected]] On Behalf Of Ahamed 
Mujeeb
Sent: Thursday, October 29, 2015 7:39 PM
To: [email protected]
Subject: [Crosswalk-help] Saving a Coockie on XwalkWebView

Hi,
Im using XWalkView as my web view component in my Android mobile project and 
I’m trying to set an authentication cookie to the Xwalkview to be maintained 
through the application. But i haven’t found a way to achieve this.

This is what i have done.


public class MainActivity extends AppCompatActivity {

private XWalkView xWalkWebView;
private XWalkCookieManager cookieManager;
private String access_token = “abc123456”;

xWalkWebView = (XWalkView) findViewById(R.id.xweb_View);
xWalkWebView.clearCache(false);

cookieManager = new XWalkCookieManager();
cookieManager.setAcceptCookie(true);
cookieManager.setAcceptFileSchemeCookies(true);
cookieManager.setCookie("http://xinfinit.test.com<http://xinfinit.test.com/>","Authorization="+access_token);

xWalkWebView.load(launchUrl, null);

}

Please i need your guidance. How could i maintain the cookie object within the 
XWalkWebView.
Im using Crosswalk-14

Regards,
Mujeeb.
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help

Reply via email to