Skip to content

Commit

Permalink
update to version 2.14.1 (#404)
Browse files Browse the repository at this point in the history
  • Loading branch information
darax committed May 1, 2023
1 parent 061edfd commit de2d9db
Show file tree
Hide file tree
Showing 38 changed files with 765 additions and 469 deletions.
2 changes: 1 addition & 1 deletion Android/Java/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'com.android.application'

def azureSpatialAnchorsSdkVersion = '2.13.0'
def azureSpatialAnchorsSdkVersion = '2.14.1'

android {
compileSdkVersion 27
Expand Down
2 changes: 1 addition & 1 deletion Android/NDK/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apply plugin: 'com.android.application'

def azureSpatialAnchorsSdkVersion = '2.13.0'
def azureSpatialAnchorsSdkVersion = '2.14.1'

/*
The arcore aar library contains the native shared libraries. These are
Expand Down
38 changes: 22 additions & 16 deletions Android/NDK/app/src/main/cpp/AzureSpatialAnchorsApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,17 @@ AzureSpatialAnchorsApplication::~AzureSpatialAnchorsApplication() {
}
}

void AzureSpatialAnchorsApplication::ModifyButtonTextOnException(std::string message, std::exception_ptr ex)
{
try {
if (ex) {
std::rethrow_exception(ex);
}
} catch (const std::exception& e) {
m_buttonText = message + e.what();
}
}

bool AzureSpatialAnchorsApplication::IsSpatialAnchorsAccountSet() {
return SpatialAnchorsAccountId != "Set me" && SpatialAnchorsAccountKey != "Set me" && SpatialAnchorsAccountDomain != "Set me";
}
Expand Down Expand Up @@ -576,14 +587,7 @@ void AzureSpatialAnchorsApplication::CreateCloudAnchor() {
const int64_t oneWeekFromNowUnixEpochTimeMs = std::chrono::duration_cast<std::chrono::milliseconds>(oneWeekFromNow.time_since_epoch()).count();
visual.cloudAnchor->Expiration(oneWeekFromNowUnixEpochTimeMs);

m_cloudSession->CreateAnchorAsync(visual.cloudAnchor, [this](Status status) {
auto itr = m_anchorVisuals.find("");
auto &visual = itr->second;
if (status != Status::OK) {
visual.color = FailedColor;
m_buttonText = "Save Failed: " + std::to_string(static_cast<uint32_t>(status));
return;
}
m_cloudSession->CreateAnchorAsync(visual.cloudAnchor, [this, &visual]() {
m_saveCount++;
visual.identifier = visual.cloudAnchor->Identifier();
visual.color = SavedColor;
Expand All @@ -601,6 +605,9 @@ void AzureSpatialAnchorsApplication::CreateCloudAnchor() {
m_progressOnSavingData = true;
m_buttonText = "Tap on screen to create next anchor";
}
}, [this, &visual](std::exception_ptr ex) {
visual.color = FailedColor;
ModifyButtonTextOnException("Save Failed: ", ex);
});
}

Expand All @@ -610,15 +617,8 @@ void AzureSpatialAnchorsApplication::DeleteCloudAnchor() {
std::string id = visual.identifier;
visual.color = NoColor;
m_cloudSession->DeleteAnchorAsync(visual.cloudAnchor,
[this, id](Status status) {
[this]() {
m_saveCount--;
if (status != Status::OK) {
m_buttonText = "Delete Failed: " + std::to_string(static_cast<uint32_t>(status));
auto itr = m_anchorVisuals.find(id);
if (itr != m_anchorVisuals.end()) {
itr->second.color = FailedColor;
}
}

if (m_demoMode == DemoMode::Basic || m_saveCount == 0) {
DestroyCloudSession();
Expand All @@ -627,6 +627,12 @@ void AzureSpatialAnchorsApplication::DeleteCloudAnchor() {
m_demoStep = DemoStep::CreateCloudAnchor;
m_showAdvanceButton = false;
}
}, [this, id](std::exception_ptr ex) {
ModifyButtonTextOnException("Delete Failed: ", ex);
auto itr = m_anchorVisuals.find(id);
if (itr != m_anchorVisuals.end()) {
itr->second.color = FailedColor;
}
});

}
Expand Down
2 changes: 2 additions & 0 deletions Android/NDK/app/src/main/cpp/AzureSpatialAnchorsApplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ namespace AzureSpatialAnchors {
void QueryAnchor();
void QueryNearbyAnchors(std::shared_ptr<CloudSpatialAnchor> const& sourceAnchor);
void QueryAnchorsNearDevice();

void ModifyButtonTextOnException(std::string message, std::exception_ptr ex);
};
}

Expand Down
8 changes: 4 additions & 4 deletions HoloLens/DirectX/SampleHoloLens/SampleHoloLens.vcxproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(SolutionDir)packages\Microsoft.Azure.SpatialAnchors.WinRT.2.13.0\build\native\Microsoft.Azure.SpatialAnchors.WinRT.props" Condition="Exists('$(SolutionDir)packages\Microsoft.Azure.SpatialAnchors.WinRT.2.13.0\build\native\Microsoft.Azure.SpatialAnchors.WinRT.props')" />
<Import Project="$(SolutionDir)packages\Microsoft.Azure.SpatialAnchors.WinRT.2.14.1\build\native\Microsoft.Azure.SpatialAnchors.WinRT.props" Condition="Exists('$(SolutionDir)packages\Microsoft.Azure.SpatialAnchors.WinRT.2.14.1\build\native\Microsoft.Azure.SpatialAnchors.WinRT.props')" />
<Import Project="..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props" Condition="Exists('..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props')" />
<Import Project="..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props" Condition="Exists('..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" />
<Import Project="$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190605.7\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190605.7\build\native\Microsoft.Windows.CppWinRT.props')" />
Expand Down Expand Up @@ -355,7 +355,7 @@
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\MeshContentTask.targets" />
<Import Project="$(VSINSTALLDIR)\Common7\IDE\Extensions\Microsoft\VsGraphics\ShaderGraphContentTask.targets" />
<Import Project="$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190605.7\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190605.7\build\native\Microsoft.Windows.CppWinRT.targets')" />
<Import Project="$(SolutionDir)packages\Microsoft.Azure.SpatialAnchors.WinRT.2.13.0\build\native\Microsoft.Azure.SpatialAnchors.WinRT.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.Azure.SpatialAnchors.WinRT.2.13.0\build\native\Microsoft.Azure.SpatialAnchors.WinRT.targets')" />
<Import Project="$(SolutionDir)packages\Microsoft.Azure.SpatialAnchors.WinRT.2.14.1\build\native\Microsoft.Azure.SpatialAnchors.WinRT.targets" Condition="Exists('$(SolutionDir)packages\Microsoft.Azure.SpatialAnchors.WinRT.2.14.1\build\native\Microsoft.Azure.SpatialAnchors.WinRT.targets')" />
<Import Project="..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets" Condition="Exists('..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" />
<Import Project="..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets" Condition="Exists('..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.targets')" />
</ImportGroup>
Expand All @@ -373,8 +373,8 @@
</PropertyGroup>
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190605.7\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190605.7\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190605.7\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Windows.CppWinRT.2.0.190605.7\build\native\Microsoft.Windows.CppWinRT.targets'))" />
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Azure.SpatialAnchors.WinRT.2.13.0\build\native\Microsoft.Azure.SpatialAnchors.WinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Azure.SpatialAnchors.WinRT.2.13.0\build\native\Microsoft.Azure.SpatialAnchors.WinRT.props'))" />
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Azure.SpatialAnchors.WinRT.2.13.0\build\native\Microsoft.Azure.SpatialAnchors.WinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Azure.SpatialAnchors.WinRT.2.13.0\build\native\Microsoft.Azure.SpatialAnchors.WinRT.targets'))" />
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Azure.SpatialAnchors.WinRT.2.14.1\build\native\Microsoft.Azure.SpatialAnchors.WinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Azure.SpatialAnchors.WinRT.2.14.1\build\native\Microsoft.Azure.SpatialAnchors.WinRT.props'))" />
<Error Condition="!Exists('$(SolutionDir)packages\Microsoft.Azure.SpatialAnchors.WinRT.2.14.1\build\native\Microsoft.Azure.SpatialAnchors.WinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)packages\Microsoft.Azure.SpatialAnchors.WinRT.2.14.1\build\native\Microsoft.Azure.SpatialAnchors.WinRT.targets'))" />
<Error Condition="!Exists('..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.props'))" />
<Error Condition="!Exists('..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\OpenXR.Headers.1.0.10.2\build\native\OpenXR.Headers.targets'))" />
<Error Condition="!Exists('..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\OpenXR.Loader.1.0.10.2\build\native\OpenXR.Loader.props'))" />
Expand Down
2 changes: 1 addition & 1 deletion HoloLens/DirectX/SampleHoloLens/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Azure.SpatialAnchors.WinRT" version="2.13.0" targetFramework="native" />
<package id="Microsoft.Azure.SpatialAnchors.WinRT" version="2.14.1" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.190605.7" targetFramework="native" />
<package id="OpenXR.Headers" version="1.0.10.2" targetFramework="native" />
<package id="OpenXR.Loader" version="1.0.10.2" targetFramework="native" />
Expand Down
9 changes: 5 additions & 4 deletions Sharing/SharingServiceSample/SharingService.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="1.0.6" />
<PackageReference Include="Microsoft.IdentityModel.Clients.ActiveDirectory" Version="5.2.8" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.8" />
<PackageReference Include="NSwag.AspNetCore" Version="13.6.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.5" />
<PackageReference Include="Microsoft.IdentityModel.Clients.ActiveDirectory" Version="5.2.9" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.16.1" />
<PackageReference Include="NSwag.AspNetCore" Version="13.16.1" />
<PackageReference Include="WindowsAzure.Storage" Version="9.3.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5187576896828606464}
m_RootOrder: 0
Expand Down Expand Up @@ -107,8 +108,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4966719baa26e4b0e8231a24d9bd491a, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FocusMode: 1
m_LightEstimationMode: 0
m_FocusMode: -1
m_LightEstimationMode: -1
m_AutoFocus: 1
m_LightEstimation: 0
m_FacingDirection: 1
--- !u!114 &8042095162876111967
MonoBehaviour:
m_ObjectHideFlags: 0
Expand All @@ -123,8 +127,6 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_UseCustomMaterial: 0
m_CustomMaterial: {fileID: 0}
m_UseCustomRendererAsset: 0
m_CustomRendererAsset: {fileID: 0}
--- !u!1 &7557246849223751478
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -158,6 +160,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2253664692221203494}
m_Father: {fileID: 0}
Expand All @@ -176,6 +179,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_AttemptUpdate: 1
m_MatchFrameRate: 1
m_TrackingMode: 2
--- !u!114 &6421600539078047361
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -213,6 +218,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fa17d122634046b4a8e23048891fafc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_RaycastPrefab: {fileID: 0}
--- !u!114 &4845545821097106987
MonoBehaviour:
m_ObjectHideFlags: 0
Expand All @@ -225,7 +231,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 728ad7fae8e460a4ba41265c7308d757, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ReferencePointPrefab: {fileID: 0}
m_AnchorPrefab: {fileID: 0}
--- !u!114 &994748070
MonoBehaviour:
m_ObjectHideFlags: 0
Expand All @@ -238,8 +244,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: e1760703bbd54c04488a8d10600262ab, type: 3}
m_Name:
m_EditorClassIdentifier:
m_PlanePrefab: {fileID: 8151457777986619403, guid: fa7ba7bd95f0c8a43b88dae247dffee5,
type: 3}
m_PlanePrefab: {fileID: 0}
m_DetectionMode: 1
--- !u!114 &994748071
MonoBehaviour:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ PrefabInstance:
- target: {fileID: 5588944806769693615, guid: d349bcbd79ed7d34e82621f4659db864,
type: 3}
propertyPath: m_RootOrder
value: 4
value: 3
objectReference: {fileID: 0}
- target: {fileID: 5588944806769693615, guid: d349bcbd79ed7d34e82621f4659db864,
type: 3}
Expand Down Expand Up @@ -1168,72 +1168,6 @@ Transform:
- {fileID: 1325473755}
- {fileID: 1993652240}
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1899559022
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1899559025}
- component: {fileID: 1899559024}
- component: {fileID: 1899559023}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1899559023
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1899559022}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_RepeatDelay: 0.5
m_ForceModuleActive: 0
--- !u!114 &1899559024
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1899559022}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 10
--- !u!4 &1899559025
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1899559022}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1907456865
Expand Down Expand Up @@ -1330,6 +1264,11 @@ PrefabInstance:
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114101810007077132, guid: da02f5d9dfcce824b88f56189675924d,
type: 3}
propertyPath: m_PresetInfoIsWorld
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114590902890860726, guid: da02f5d9dfcce824b88f56189675924d,
type: 3}
propertyPath: m_Text
Expand Down
Loading

0 comments on commit de2d9db

Please sign in to comment.