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.
Options

Prevent an app from going to sleep/crashing when handing off the Immersive device to another user

I have had an issue for a while where we would like to demo an app on the immersive device and would like to start the user already in the app, maybe after some menus have been navigated. However, often the app will just close when I remove the headset and the other user puts it on, or it might be stuck on the black screen which is basically the equivalent of crashing.

How do I prevent this, especially given how inconsistent it is and the same app might perform this handoff behavior just fine in testing but will fail on later attempts? I have looked into a number of solutions including enabling the run in background setting in unity and the extended execution session for uwp, none of which seem to fix the issue.

any help would be appreciated.

Best Answer

Answers

  • Options

    In my side, it works well. Could you use a sample in MRTK to reproduce your issue?

  • Options
    nyt_Rushnyt_Rush
    edited September 2018

    @EricWilson @MRFan Hi, I am new hololens devlopement..even I am trying to run the app in the background...were you able to solve this issue.
    How did you implement extended execution in unity solution even I want to try this approach..could you please guide me about it?

  • Options
    Answer ✓

    @nyt_Rush there is a run in background option in the player settings in unity. if that doesn't work you can take a look at the docs for https://docs.microsoft.com/en-us/windows/uwp/launch-resume/run-minimized-with-extended-execution.

    I was never able to get my desired result through code however. In order to prevent the app from returning to the menu, we blocked the sensor in the headset that determines if a user is wearing the headset. This way, it is not able to exit an app when handoff occurs.

  • Options
    nyt_Rushnyt_Rush
    edited September 2018

    @EricWilson said:
    @nyt_Rush there is a run in background option in the player settings in unity. if that doesn't work you can take a look at the docs for https://docs.microsoft.com/en-us/windows/uwp/launch-resume/run-minimized-with-extended-execution.

    I was never able to get my desired result through code however. In order to prevent the app from returning to the menu, we blocked the sensor in the headset that determines if a user is wearing the headset. This way, it is not able to exit an app when handoff occurs.

    Hi @EricWilson ,

    Thanks, for the prompt reply, how did you block the sensor is there any internal API built for this sort of behavior?

  • Options

    @nyt_Rush Not as far as I know, unfortunately. We went with a simpler option and decided to put a sticky note over the sensor to prevent it from detecting distance.

Sign In or Register to comment.