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.

Best Way to Request Geolocation Permissions in Unity3D C# Behavior

Hello everyone,

I was wondering if somebody could provide me with a sample with the best method to request geolocation permissions from a user on the Microsoft HoloLens. I used the sample Unity3D geolocation code they provide for Location Services. When I trigger the "Start()" it does prompt the user, but never saves the preferences to the Settings > Privacy. I usually have to go back in and check my app to allow Geolocation and then it begins to work. Even with pressing "Yes" to allow it does not save in the emulator environment for the next app launch when keeping the emulator open (with the same emulator session).

Thanks
Chris Zenzel

Christopher Zenzel

Shaping the Future by Being a Leader in Technology while Living with Autism (ASD). Looking for Opportunities in Magic.

https://chriszenzel.com
https://linkedin.com/in/chriszenzel

Best Answer

Answers

  • CZenzelCZenzel

    I found two issues:

    • The emulator is not providing correct permission grants after allowing the application using the interface. The device is performing correctly after permission is granted. (Seems the permissions are emulator problems).

    • After requesting the location, before using lastData from Unity, you must wait an additional 2 - 3 seconds using the "yield" before requesting any sensor data on the actual device.

    Christopher Zenzel

    Shaping the Future by Being a Leader in Technology while Living with Autism (ASD). Looking for Opportunities in Magic.

    https://chriszenzel.com
    https://linkedin.com/in/chriszenzel

  • @CZenzel do you have the Location capability checked in Unity under the:
    Edit | Project Settings | Player | INSPECTOR | Publishing Settings | Capabalities

    Windows Holographic User Group Redmond

    WinHUGR.org - - - - - - - - - - - - - - - - - - @WinHUGR
    WinHUGR YouTube Channel -- live streamed meetings

Sign In or Register to comment.