简体   繁体   English

Azure 空间云锚点- SessionUpdatedListener 未接收到事件

[英]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.在我的 android 应用程序中,我正在尝试创建空间锚点作为其中的一部分,我正在为云锚点管理器注册 SessionUpdatedListener。 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. SessionUpdatedListener 正在接收事件,我能够扫描环境并且还能够点击屏幕以启动锚点创建,事情是当我创建视觉对象时我没有收到 SessionUpdatedListener 的事件有时需要几秒钟分钟。 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) {
                  }
    }

}

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.如果您获得 session 更新事件就好了,但是一旦您调用 CreateAnchor,更新事件的频率就会降低,这是预期的行为,您应该只是偶尔获得更新事件,如果您是静止的,您可能有一段时间不会获得它们。 The RecommendedForCreateProgress is intended to be an API that you monitor and once that value reaches a certain threshold, you would call CreateAnchor. RecommendedForCreateProgress 旨在成为您监控的 API,一旦该值达到特定阈值,您将调用 CreateAnchor。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM