> 1. While using crosswalk in normal mode there is an api mport 
> org.xwalk.core.internal.XWalkViewBridge with which I set the user agent for 
> the webview

You can use org.xwalk.core.XWalkView.setUserAgentString() in latest 
crosswalk-14.

> 2. And there is another api known as import 
> org.xwalk.core.internal.XWalkCookieManager which is used to handle Cookies on 
> webview.

We will provide the interface org.xwalk.core.XWalkCookieManager soon in a later 
version. please be patient.

Thanks,
Lin

From: Crosswalk-help 
[mailto:[email protected]] On Behalf Of Haris 
Zaman
Sent: Wednesday, July 29, 2015 04:04
To: [email protected]
Subject: [Crosswalk-help] Android:User Agent and Cookie handling in shared mode

Hi,

I have problem while using crosswalk in shared mode with setting user agent and 
handling cookies

1. While using crosswalk in normal mode there is an api mport 
org.xwalk.core.internal.XWalkViewBridge with which I set the user agent for the 
webview :

java.lang.reflect.Method ___getBridge = 
XWalkView.class.getDeclaredMethod("getBridge");  
___getBridge.setAccessible(true);
XWalkViewBridge xWalkViewBridge = null;
xWalkViewBridge = (XWalkViewBridge)___getBridge.invoke(webView);
XWalkSettings xWalkSettings = xWalkViewBridge.getSettings();
xWalkSettings.setUserAgentString(userAgent);

2. And there is another api known as import 
org.xwalk.core.internal.XWalkCookieManager which is used to handle Cookies on 
webview.

Both of these apis are not accessible in shared mode, Kindly suggest how to set 
the user agent and handle cookies while using crosswalk in shared mode.

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

Reply via email to