It's asynchronous to load URL if you use Crosswalk Cordova
plugin<https://github.com/crosswalk-project/cordova-plugin-crosswalk-webview>,
client will be notified when XWalk is ready.
Runnable cancelCommand = new Runnable() {
@Override
public void run() {
cordova.getActivity().finish();
}
};
Runnable completeCommand = new Runnable() {
@Override
public void run() {
cookieManager = new XWalkCordovaCookieManager();
initWebViewSettings();
exposeJsInterface(webView, bridge);
loadUrl(startUrl, true);
}
};
activityDelegate = new XWalkActivityDelegate((Activity) context,
cancelCommand, completeCommand);
You can also refer the fork of Crosswalk Cordova to use XWalkActivity, the
CordovaActivity need to be extended XWalkActivity.
https://github.com/crosswalk-project/crosswalk-cordova-android/commit/2db7369014649cc0cf30635db5af9c470d24b910
Thanks,
Junwei.
From: Crosswalk-help
[mailto:[email protected]] On Behalf Of Eitan
Schreiber
Sent: Tuesday, December 01, 2015 4:39 PM
To: Zhang, Xiaofeng
Cc: [email protected]
Subject: Re: [Crosswalk-help] crosswalk bootstrap
Hi ,
Thanks for response,
I tried using the XWalkActivity , but I need to call the loadURL on
onXWalkReady- the problem is XWalkActivity do not extend CordovaActivity...
Thanks,
Eitan.
From: "Zhang, Xiaofeng"
<[email protected]<mailto:[email protected]>>
To: Eitan Schreiber/Haifa/IBM@IBMIL,
"[email protected]<mailto:[email protected]>"
<[email protected]<mailto:[email protected]>>
Date: 11/29/2015 09:10 AM
Subject: RE: [Crosswalk-help] crosswalk bootstrap
________________________________
Hi
Did you tried XWalkActivity
https://crosswalk-project.org/apis/embeddingapidocs_v5/org/xwalk/core/XWalkActivity.html?
Best Regards :)
Xiaofeng Zhang
From: Crosswalk-help
[mailto:[email protected]] On Behalf Of Eitan
Schreiber
Sent: Tuesday, November 24, 2015 5:19 PM
To:
[email protected]<mailto:[email protected]>
Subject: [Crosswalk-help] crosswalk bootstrap
Hi,
On current crosswalk implementation the bootstrap of crosswalk is done through
loadUrl method called on the Activity.onCreatemethod.
This situation is problematic for my App since I support a case where the
full project structure is compressed when main activity is created.
So what we do is to decompress the App Asynchronously on the onCreate of main
activity, and we call the loadUrl only when the Asynchronous process completes.
On this scenario we can not get crosswalk working, since we did not call the
loadUrl on the onCreate stage of the Activity.
I found a kind of hack: calling the loadUrl with an empty URL on the onCreate
stage, but I prefer not doing a hack - just doing things correctly.
How can it be done ?
Thanks,
Eitan Schreiber.
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help