Hello everyone.

We have decided to phase out the Mixed Reality Forums over the next few months in favor of other ways to connect with us.

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.

The plan between now and the beginning of May is to clean up old, unanswered questions that are no longer relevant. The forums will remain open and usable.

On May 1st we will be locking the forums to new posts and replies. They will remain available for another three months for the purposes of searching them, and then they will be closed altogether on August 1st.

So, where does that leave our awesome community to ask questions? Well, there are a few places we want to engage with you. 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. 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.