July 2017
Beginner to intermediate
390 pages
10h 53m
English
You may be surprised. If you have your app set up to use TCP to share data, you have done 90% of the work you need to do to share anchors as well.
First, we need permission to share anchors. This is similar to the code we used to request access to the depth sensors. The app has declared that it wants access to the spatial capabilities and here we check to see if we have actually been granted that right. We need to do that when we send our coordinates, and when we want to receive them:
private async void ShareCoordinates(Dictionary<string, SpatialAnchor> anchors, StreamSocket stream) { var requestResult = await SpatialAnchorTransferManager.RequestAccessAsync(); if (requestResult != SpatialPerceptionAccessStatus.Allowed) ...Read now
Unlock full access