Search Unity

Launching external app

Discussion in 'VR' started by arturmandas, Apr 5, 2019.

  1. arturmandas

    arturmandas

    Joined:
    Sep 29, 2012
    Posts:
    240
    Hi there,
    I want to launch external app on Holo. Now, since the System.Process is unavailable, I can't just run process. So I want to use URI launcher, but with options configured to recommend app:

    Code (CSharp):
    1.  var options = new Windows.System.LauncherOptions();
    2.         options.PreferredApplicationPackageFamilyName = "Contoso.URIApp_8wknc82po1e";
    3.         options.PreferredApplicationDisplayName = "Contoso URI Ap";
    4.         // Launch the URI
    5.         var success = await Windows.System.Launcher.LaunchUriAsync(uri);
    My problem is, I cannot get Unity to recognize Windows.System namespace. I can get to work Unity Launcher.Uri residing in UnityEngine.WSA, but that does not allow me to configure launch options, as far as I can see.

    Any advice?

    Best regards
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Wrap the code if #if ENABLE_WINMD_SUPPORT/#endif define.