protected override async void OnActivated(EventArgs e) { if (bLoading == false) { //Test whether the app we want to launch is installed var supportStatus = await Launcher.QueryUriSupportAsync(uri, LaunchQuerySupportType.Uri, TargetPackageFamilyName); if (supportStatus != LaunchQuerySupportStatus.Available) { bLoading = true; Status.Text = "We need to install :) " + supportStatus.ToString(); AppInstallManager manager = new AppInstallManager(); var installItems = await manager.StartAppInstallAsync("9NBLGGH2JHXJ", "0010", true, false); installItems.StatusChanged += new TypedEventHandler<AppInstallItem, System.Object>((app, obj) => StatusChangedUpdate(Status, app, obj)); installItems.Completed += new TypedEventHandler<AppInstallItem, System.Object>((app, obj) => CompletedUpdate(Status, app, obj)); } else { LaunchTargetApp.IsEnabled = true; } } }
public AppInstallManagerEvents(AppInstallManager This) { this.This = This; }