Having issues opening links with Crosswalk on some Android variants


#1

Hi,

I am using Crosswalk (meter add crosswalk). An in general it seems pretty good.

However for opening external links I am getting inconsistent results.

For example, on Motorola/4.4.4, the Android SDK emulator (and iOS for that matter) a window.open(link, '_system', 'location=no'); works fine.

However, on a Samsun Tab (SM-T30) with Android 5.0.2 and Lenova TAB with 4.4.2 the links won’t open. (sorry can’t seem to get debugger working with these live devices)… so cannot work out why this is the case.

Any ideas welcome?

Update: OK I connected my Samsung table cia USB to computer to debug it.

I changed the call to window.open(encodeURI(link), '_system'); (so I droped the location=no for the 3rd param).

I actually got it to open the site in the app. IIt does not seem to want to use the _system option as it open in the inAppBrowser.

I see the following issue in the console:

I20151128-17:39:13.538(11)? E/chromium( 1798): [ERROR:runtime_javascript_dialog_manager.cc(64)] Not implemented reached in virtual void xwalk::RuntimeJavaScriptDialogManager::CancelActiveAndPendingDialogs(content::WebContents*)
I20151128-17:39:17.586(11) (android:https://www.facebook.com/connect/ping:1) Given URL is not allowed by the Application configuration: One or more of the given URLs is not allowed by the App's settings.  It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.

So this looks like some sort of cross domain issue (not sure of that’s the root cause)… anyway, I have this in my mobile-config.js : App.accessRule('*');

I also have this BrowserPolicy:

 BrowserPolicy.content.allowOriginForAll("*");
 BrowserPolicy.content.allowConnectOrigin("*");

Any help appreciated