How to use launchUri between Apps


#1

I am studying launchUri between made Fusetools apps.

But if i use lauchUri then my app crashed.

When i click send button(in InterApp1) then InterApp1 terminated.
Alse when I click send button(in InterApp2) then InterApp2 terminated.
But, InterApp.launchUri(“http://www.google.com”) work fine.

This is my two apps code.

InterApp1.unorpoj

{
“RootNamespace”:"",
“Packages”: [
“Fuse”,
“FuseJS”,
“Fuse.Launcher.InterApp”
],
“Includes”: [
“*”
],
“Mobile”: {
“UriScheme”: “InterApp1”
}
}

InterApp2: MainView.ux

<JavaScript>
	var Observable = require('FuseJS/Observable');
	var InterApp = require('FuseJS/InterApp');

	var textMsg = Observable("no");

	InterApp.on("receivedUri", function(uri) {
		textMsg.value = uri;
	});

	function sendMessage() {
		InterApp.launchUri("InterApp2://Some Message");
	}

	module.exports = {
		textMsg, sendMessage
	};
</JavaScript>

<StackPanel Alignment="Center">
	<Text Value="{textMsg}" Color="Black" Alignment="Center" Margin="30" />
	<Button Text="send" Clicked="{sendMessage}" />
</StackPanel>

InterApp2.unoproj
{
“RootNamespace”:"",
“Packages”: [
“Fuse”,
“FuseJS”,
“Fuse.Launcher.InterApp”
],
“Includes”: [
“*”
],
“Mobile”: {
“UriScheme”: “InterApp2”
}
}

InterApp2: MainView.ux

<JavaScript>
	var Observable = require('FuseJS/Observable');
	var InterApp = require('FuseJS/InterApp');

	var textMsg = Observable("no2");

	InterApp.on("receivedUri", function(uri) {
		textMsg.value = uri;
	});

	function sendMessage() {
		InterApp.launchUri("InterApp1://Some Message2");
	}

	module.exports = {
		textMsg, sendMessage
	};
</JavaScript>

<StackPanel Alignment="Center">
	<Text Value="{textMsg}" Color="Black" Alignment="Center" Margin="30" />
	<Button Text="send" Clicked="{sendMessage}" />
</StackPanel>