How to launch javascript universal windows applica

2019-08-20 06:59发布

问题:

My requirement is to launch UWP app from another UWP app.And i made it but its working in windows 10 desktop system not on Windows IoT OS,Kindly help me to fix this.

$(document).on('click', '.openTAT', function () {
    var testAppUri = new Windows.Foundation.Uri("test-app2app:");
    var options = new Windows.System.LauncherOptions();
    options.TargetApplicationPackageFamilyName = "TATApp_ehke6zp0mbebr";
    Windows.System.Launcher.launchUriAsync(testAppUri, options).then(
        function (success) {
            if (success) {
                // URI launched
                x = "success";
                $("#errorLabel").html("success");
            } else {
                x = "failed";
                $("#errorLabel").html("failed");
                // URI launch failed
            }
        });
});