0

Is it possible, and if so how can you launch a windows 8.1 application that has been installed on the computer from another windows 8.1 application?

I have found that for windows phone 8 you can use the following:

IEnumerable<Package> apps = Windows.Phone.Management.Deployment.InstallationManager.FindPackagesForCurrentPublisher();
apps.First().Launch(string.Empty);

but I cannot find a windows 8 equivalent.

I have read about Uri activation and Uri schemes but was unable to find the answer to my question.

Thanks in advance for any help.

Community
  • 1
  • 1
jack moseley
  • 439
  • 4
  • 12

1 Answers1

0

Here is an example where you open a PDF file, letting the user select the application they want to use. If the application is not installed, it prompts the user to download it from the store.

Notice also that I set the application to snap to the side and open the file in the other app side by side.

private async void TextBlock_Tapped(object sender, TappedRoutedEventArgs e)
{
    StorageFile pdf = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/irisclasson.pdf"));

    await
        Launcher.LaunchFileAsync(pdf,
            new LauncherOptions
            {
                PreferredApplicationDisplayName = "PDF Touch",
                PreferredApplicationPackageFamilyName = "162a2931-8ee6-4a56-9570-53282525d7a3",

                DisplayApplicationPicker = true,
                DesiredRemainingView = ViewSizePreference.UseHalf
            });
}

enter image description here

enter image description here

enter image description here

Iris Classon
  • 5,752
  • 3
  • 33
  • 52
  • if they have the preferred application installed, then set display application picker to false, would the preferred application automatically open? Also is this only possible through opening files? - also thanks for the help so far – jack moseley Mar 18 '14 at 10:38