Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.

Open Microsoft Edge while running the app

Hello,

I wanted to open Microsoft Edge while running an app with the HoloLens. In my particular case, I'm developing a simple 2D app in Unity, where the idea is to press a button and open a pdf file, image, etc.

Is this possible? what would I need to implement in order to do it?

Thanks in advance!

Tagged:

Answers

  • I think that, generally, the UWP provides you with mechanisms to launch apps from your app either by scheme (e.g. http://) or by file extension (e.g. .png) and then the decision about which app actually handles those things is in the control of the user.

    You can see the APIs that are used to do this by looking at the Launcher class and maybe especially the LaunchUriAsync and LaunchFileAsync methods.

    So, if you had a file named myfile.html embedded at the 'top level' of your application package then you might be able to write code such as;

            var file = await StorageFile.GetFileFromApplicationUriAsync(
                new Uri("ms-appx:///myfile.html"));
    
            await Launcher.LaunchFileAsync(file);
    

    in order to launch Edge to display that HTML file.

    Hope that helps.

  • Warren93Warren93
    edited July 2018

    In Unity, I think you can also do:
    Application.OpenURL("your url");

    Don't know if/how well this would work for local file paths, though.

Sign In or Register to comment.