Closed maximilianoZavala closed 3 years ago
Hey @maximilianoZavala, thanks for bringing this to our attention! I've filed an internal item (#34098952) to get this tutorial updated. Given our offline conversations, it seems that you were able to get things working eventually with a modern version of the ASA SDK. Will leave this open until we get the tutorial updated.
Hi @maximilianoZavala
Thanks for reporting this. We have just updated the Android Tutorial and have addressed this issue. https://docs.microsoft.com/en-us/azure/spatial-anchors/tutorials/tutorial-new-android-app?tabs=azure-portal
Description
Hello, I have recently ran into issues when attempting to complete the tutorial "Tutorial: Step-by-step instructions to create a new Android app using Azure Spatial Anchors" found in the documentation for Azure Spatial Anchors. When I directly copied all steps and code from this tutorial I was never actually able to upload any anchors to Azure. After some debugging I came to realize this was because I was never able to collect sufficient data about my environment (recommendedSessionProgress would never move from initialized value of 0). Some time later I realized that the SDK version used in this step-by-step tutorial was outdated (2.2.0) however, when I tried to update to SDK 2.9.0 (or any version newer than 2.2.0) my app would crash immediately on startup and I would receive the following error log right before the application would close:
"2021-06-08 14:55:02.088 19397-19397/com.example.attemptasa2 E/CBindingAutoGen: exception causing failure: LogException @ D:/a/_work/1/s/SpatialServices/API/src/Android/AzureSpatialAnchorsApiJni/Platform/ARCoreJniPlatformSession.cpp:27, SpatialServices::ARCoreJniPlatformSession::ARCoreJniPlatformSession(ssc_platform_session_handle) : Assertion failed: platformSessionHandle != nullptr CallStack: ReposeStackWalker is not supported on this platform :-("
Finally, I learned that if I downgrade SDK versions to 1.1.0 my app would not crash and it would successfully upload my local anchors to Azure however, I am now unable to retrieve them.
All code used was directly copied from this tutorial (https://docs.microsoft.com/en-us/azure/spatial-anchors/tutorials/tutorial-new-android-app?tabs=azure-portal).
Steps to reproduce the issue
Attempt to recreate tutorial exactly as is and attempt to save an anchor to Azure. The black sphere created will never change color and "recommendedSessionProgress" will not change from initialized value.
Change SDK version in gradle.app dependencies to 2.9.0 and attempt to run application, crashes on startup.
Downgrade SDK version in gradle.app to 1.1.0 and I am able to successfully save an anchor but am never able to locate it again.
Expected behavior
Expected outcome from tutorial "Tutorial: Step-by-step instructions to create a new Android app using Azure Spatial Anchors". Never able to upload anchor from step in tutorial titled "Upload your local anchor into the cloud".
Development information (please complete the following information)
AR Device information (please complete the following information):
Not able to include .zip folder or any .java files. I can create a pull request and link it to this issue but my code is identical to that found in tutorial here: https://docs.microsoft.com/en-us/azure/spatial-anchors/tutorials/tutorial-new-android-app?tabs=azure-portal