Hi Vincent, For your first question, as my understanding, you want to show a loading page during the page load. We call this launch screen, you can find the wiki for this feature in https://github.com/crosswalk-project/crosswalk-website/wiki/Launch-Screen
The XWalk Launch Screen feature is only available when you are using packaging tool .to package your project currently. If you are using Embedding XWalkView, I suggest you use the Android Dialog to display your loading page, and XWalkView shown in the main activity. The XWalkView will active behind the dialog. This is the technology what Launch Screen feature do, and it's workable. Wish this answer can help you. Br. Guangzhen -----Original Message----- From: Crosswalk-help [mailto:[email protected]] On Behalf Of Zhu, Yongsheng Sent: Wednesday, April 30, 2014 9:20 AM To: Vincent Bernat; [email protected] Subject: Re: [Crosswalk-help] Use of embedded webview Hi, > 1. I am using a LinearLayout to show a "loading" screen until the > webview is ready. I know that the webview is ready when it will call > a special JS function (declared as a > JavascriptInterface). Unfortunately, when the webview is not visible > (because pushed outside of the screen by the loading widget), the > webpage doesn't seem to be running at all. I don't even see it in > the web inspector. If I make the webview visible from the beginning, > no problem. So, is there a way to make the webview "live" without > being visible? I've checked your code. And the code don't call onHide/pauseTimers methods of XWalkView which pause the web engine inside Crosswalk. So that web engine is not paused when it's background. I think the stopped loading may be due to Android system management. Android is not like desktop. When an app is not in front, system needs to pause many things of the app. > 2. My main interest in Crosswalk is the ability to have WebGL > available. When I load the WebGL sample from my application, it runs > for three seconds then seems to be killed by OOM (in dmesg, I see a > lot of "send sigkill to XXX (XXX). adj XXX, size XXX"). Is there a > way to debug that (I am not really skilled in Android > programming). The WebGL sample is loaded through an iframe whose > size is 100% and the viewport of the webview is 1280x720. I am > running it on a real Nexus 5. This is weird to me. Maybe you can share the test case with us. Thanks for trying Crosswalk. Yongsheng > -----Original Message----- > From: Crosswalk-help > [mailto:[email protected]] On Behalf > Of Vincent Bernat > Sent: Wednesday, April 30, 2014 12:04 AM > To: [email protected] > Subject: [Crosswalk-help] Use of embedded webview > > Hi! > > For a small project, I am trying to make use of the just released > embedded webview in the canary branch. My code is here: > > https://github.com/vincentbernat/dashkiosk/blob/feature/crosswalk/andr > oid/sr c/com/deezer/android/dashkiosk/DashboardWebView.java > > I am left with two problems. > > 1. I am using a LinearLayout to show a "loading" screen until the > webview is ready. I know that the webview is ready when it will call > a special JS function (declared as a > JavascriptInterface). Unfortunately, when the webview is not visible > (because pushed outside of the screen by the loading widget), the > webpage doesn't seem to be running at all. I don't even see it in > the web inspector. If I make the webview visible from the beginning, > no problem. So, is there a way to make the webview "live" without > being visible? > > 2. My main interest in Crosswalk is the ability to have WebGL > available. When I load the WebGL sample from my application, it runs > for three seconds then seems to be killed by OOM (in dmesg, I see a > lot of "send sigkill to XXX (XXX). adj XXX, size XXX"). Is there a > way to debug that (I am not really skilled in Android > programming). The WebGL sample is loaded through an iframe whose > size is 100% and the viewport of the webview is 1280x720. I am > running it on a real Nexus 5. > > Also, I was using this snippet to get JS logs directly in the logs of the > application: > > /* Log Javascript stuff */ > this.setWebChromeClient(new WebChromeClient() { > @Override > public boolean onConsoleMessage(ConsoleMessage cm) { > Log.d(TAG, "Javascript log (" + cm.sourceId() + ":" + > cm.lineNumber() + "): " + cm.message()); > return true; > } > }); > > This would be handy to be able to do the same thing with crosswalk > (but I should be able to propose a patch for this, I think). > -- > Keep it simple to make it faster. > - The Elements of Programming Style (Kernighan & Plauger) > _______________________________________________ > Crosswalk-help mailing list > [email protected] > https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help _______________________________________________ Crosswalk-help mailing list [email protected] https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help _______________________________________________ Crosswalk-help mailing list [email protected] https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help
