hi,
I want to launch an app #2 inside my app #1 or if it is not installed, redirect to the store.
In app #2, I register a specific file Extension (for example : .myspecificapp) described in the documentation : How to handle file activation
In app #1, I use the Windows.System.Launcher :
// Path to the file to launch, relative to the package's install directory.
var fileToLaunch = "files\\file.myspecificapp";
// Launch a .png file that came with the package.
function launchFile() {
// First, get the image file from the package's image directory.
Windows.ApplicationModel.Package.current.installedLocation.getFileAsync(fileToLaunch).then(
function (file) {
// Now launch the retrieved file.
Windows.System.Launcher.launchFileAsync(file).then(
function (success) {
if (success) {
WinJS.log && WinJS.log("File " + file.name + " launched.", "sample", "status");
} else {
WinJS.log && WinJS.log("File launch failed.", "sample", "error");
}
});
});
}
But the problem is if app #2 is not installed on my system, Metro shows a popup as if I had enabled the displayApplicationPicker to true. In this case, I would like redirect the user to the store.
Is it possible to know if an application is installed or have you another idea to implement this case ?