I am building a multi-page app using Navigator, I defined each page in its own UX file as ux:Class
, like this:
<Page ux:Class="AboutPage">
<Router ux:Dependency="router" />
...
</Page>
Then I integrated the WebView like this:
<Page ux:Class="AboutPage">
<Router ux:Dependency="router" />
<JavaScript>
module.exports = {
onPageLoaded : function(res) {
console.log("WebView arrived at "+ JSON.parse(res.json).url);
}
};
</JavaScript>
<DockPanel>
<StatusBarBackground Dock="Top"/>
<NativeViewHost>
<WebView Dock="Fill" Url="http://www.google.com">
<PageLoaded>
<EvaluateJS Handler="{onPageLoaded}">
var result = {
url : document.location.href
};
return result;
</EvaluateJS>
</PageLoaded>
</WebView>
</NativeViewHost>
<BottomBarBackground Dock="Bottom" />
</DockPanel>
</Page>
Running on fuse simulator doesn’t show any error, but my app crashes as soon as I open it on an Android mobile device.
Any ideas why this is happening?
Thanks