'Azure spatial cloud anchor- SessionUpdatedListener not receiving the events
On my android app, I am trying to create spatial anchor as part of it, I am registering SessionUpdatedListener for cloud anchor manager. SessionUpdatedListener is receiving the events, I am able to scan the environment and was also able to tap on screen to initiate the anchor creation, thing is when I am creating the visual I am not receiving the events to the SessionUpdatedListener for a seconds sometimes taking upto minute. any insights would be helpful why the events were not receiving during the visual creation
createVisual(){
anchorVisuals[""] = visual
}
cloudAnchorManager!!.addSessionUpdatedListener { args: SessionUpdatedEvent ->
val progress = args.status.recommendedForCreateProgress
if (progress >= 1.0) {
val visual = anchorVisuals[""]
if (visual != null) {
}
}
}
Solution 1:[1]
If you are getting session update events just fine but once you call CreateAnchor there are less frequent update events, that is expected behavior, you should only get update events occasionally and you might not get them for some time if for ex you are stationary. The RecommendedForCreateProgress is intended to be an API that you monitor and once that value reaches a certain threshold, you would call CreateAnchor.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | asergaz |
