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.
Device usage consent dialog in Unity app for Hololens
The story in short:
I'm trying to get some data from Android(or WP10) phone to Hololens using RFCOMM Serial profile(rfcomm is important point, so unfortunately can't use BLE features or Wifi). Haven't succeed a lot with doing as Hololens=BluetoothClient(same code for WP10 works like a charm), so change direction to Hololens=BluetoothHost. And it actually works, but with next issue: the attempt to connect from client device silently fails in connection event handler.
In same case with same code in UWP app on hololens the system consent dialog to allow using device from app appears. So user confirms it and everything is ok. In Unity app - nothing for user. So my only way for now is close app, go to Settings -> Privacy -> Other devices and manually allow device/app usage.
Is there any way to show such a dialog or some alternative inside Unity app? I'll appreciate any help.
Some code sample and details are in my SO question
Answers
I am at this is exact point now in my project. Did you have any luck finding a solution to this?
Hi,
Unfortunately I haven't succeed at solving this issue
Did you ever file a bug with Unity3D?
Hi together,
any Progress on this Point?
I face the same issue, according to https://social.msdn.microsoft.com/Forums/vstudio/en-US/1eacdbe8-ec89-4f39-85f2-dcaeb25c2fc0/8000000e-a-method-was-called-at-an-unexpected-time-from-await-bluetoothledevicefromidasyncid?forum=wdk
the problem lies in the fact, that the code is running on a thread that is not the UI thread. I tried to dispatch the call RfcommDeviceService.FromIdAsync(Id) to - what I assume to be - the UI thread, but that did not work reliably. In all my many tries, I only saw that permission dialog once.
I tried the Dispatcher from Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher
Did anyone else succeed with a different dispatcher?