Skip to content

Commit 9bfb4c6

Browse files
authored
Merge pull request #115539 from julianparismorgan/user/pmorgan/account-domain
Azure Spatial Anchors - Add instructions on settings account domain
2 parents a7edaee + a7b007c commit 9bfb4c6

File tree

8 files changed

+20
-0
lines changed

8 files changed

+20
-0
lines changed

articles/spatial-anchors/quickstarts/get-started-android.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ Locate the `SpatialAnchorsAccountKey` field and replace `Set me` with the accoun
8282

8383
Locate the `SpatialAnchorsAccountId` field and replace `Set me` with the account identifier.
8484

85+
Locate `public AzureSpatialAnchorsManager(Session arCoreSession)` and add the following line, substituting in your account domain from earlier: `spatialAnchorsSession.getConfiguration().setAccountDomain("MyAccountDomain");`.
86+
8587
# [NDK](#tab/openproject-ndk)
8688

8789
Open `Android/NDK/app/src/main/cpp/AzureSpatialAnchorsApplication.cpp`.
@@ -90,6 +92,8 @@ Locate the `SpatialAnchorsAccountKey` field and replace `Set me` with the accoun
9092

9193
Locate the `SpatialAnchorsAccountId` field and replace `Set me` with the account identifier.
9294

95+
Locate `AzureSpatialAnchorsApplication::StartCloudSession()` and add the following line, substituting in your account domain from earlier: `m_cloudSession->Configuration()->AccountDomain("MyAccountDomain");`.
96+
9397
---
9498

9599
## Deploy the app to your Android device

articles/spatial-anchors/quickstarts/get-started-hololens.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ Locate the `SpatialAnchorsAccountKey` field and replace `Set me` with the accoun
4949

5050
Locate the `SpatialAnchorsAccountId` field and replace `Set me` with the account identifier.
5151

52+
Locate `case DemoStep::ConfigSession:` and add the following line, substituting in your account domain from earlier: `configuration.AccountKey("MyAccountDomain");`.
53+
5254
## Deploy the app to your HoloLens
5355

5456
Change the **Solution Configuration** to **Release**, change **Solution Platform** to **x86**, and select **Device** from the deployment target options.

articles/spatial-anchors/quickstarts/get-started-ios.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ Locate the `spatialAnchorsAccountKey` field and replace `Set me` with the accoun
9797

9898
Locate the `spatialAnchorsAccountId` field and replace `Set me` with the account identifier.
9999

100+
Locate `startSession()` and add the following line, substituting in your account domain from earlier: `cloudSession!.configuration.accountDomain = "MyAccountDomain";`.
101+
100102
# [Objective-C](#tab/openproject-objc)
101103

102104
Open `iOS/Objective-C/SampleObjC/BaseViewController.m`.
@@ -105,6 +107,8 @@ Locate the `SpatialAnchorsAccountKey` field and replace `Set me` with the accoun
105107

106108
Locate the `SpatialAnchorsAccountId` field and replace `Set me` with the account identifier.
107109

110+
Locate `startSession()` and add the following line, substituting in your account domain from earlier: `_cloudSession.configuration.accountKey = @"MyAccountDomain";`.
111+
108112
---
109113

110114
## Deploy the app to your iOS device

articles/spatial-anchors/quickstarts/get-started-xamarin-android.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ Locate the `SpatialAnchorsAccountKey` field and replace `Set me` with the accoun
5959

6060
Locate the `SpatialAnchorsAccountId` field and replace `Set me` with the account identifier.
6161

62+
Locate `AzureSpatialAnchorsManager(Session arCoreSession)` and add the following line, substituting in your account domain from earlier: `this.spatialAnchorsSession.Configuration.AccountId = "MyAccountDomain";`.
63+
6264
## Deploy the app to your Android device
6365

6466
Power on the Android device, sign in, and connect it to the computer using a USB cable.

articles/spatial-anchors/quickstarts/get-started-xamarin-ios.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ Locate the `SpatialAnchorsAccountKey` field and replace `Set me` with the accoun
5151

5252
Locate the `SpatialAnchorsAccountId` field and replace `Set me` with the account identifier.
5353

54+
Locate `StartSession()` and add the following line, substituting in your account domain from earlier: `this.cloudSession.Configuration.AccountKey = "MyAccountDomain";`.
55+
5456
## Deploy the app to your iOS device
5557

5658
Power on the iOS device, sign in, and connect it to the computer using a USB cable.
43.7 KB
Loading

includes/spatial-anchors-get-started-create-resource.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ Then, you can view the resource properties. Copy the resource's **Account ID** v
3636

3737
![Resource properties](./media/spatial-anchors-get-started-create-resource/view-resource-properties.png)
3838

39+
Also copy the resource's **Account Domain** value into a text editor because you'll need it later.
40+
41+
![Account domain](./media/spatial-anchors-get-started-create-resource/view-resource-domain.png)
42+
3943
Under **Settings**, select **Key**. Copy the **Primary key** value into a text editor. This value is the `Account Key`. You'll need it later.
4044

4145
![Account key](./media/spatial-anchors-get-started-create-resource/view-account-key.png)

includes/spatial-anchors-unity-configure-scene.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ ms.author: crtreasu
88
The next step is to configure the app to use your account identifier and account key. You copied them into a text editor when [setting up the Spatial Anchors resource](#create-a-spatial-anchors-resource).
99

1010
In the **Project** pane, navigate to `Assets\AzureSpatialAnchors.SDK\Resources`. Select `SpatialAnchorConfig`. Then, in the **Inspector** pane, enter the `Account Key` as the value for `Spatial Anchors Account Key` and the `Account ID` as the value for `Spatial Anchors Account Id`.
11+
12+
Next, open up `SpatialAnchorManager.cs`. Find `CreateSessionAsync()` and add the following line, substituting in your account domain from earlier: `session.Configuration.AccountId = "MyAccountDomain";`. You can add this line directly before this comment `// Configure authentication`.

0 commit comments

Comments
 (0)