如何 return 在 android 中估算可接近的类型

How to return Estimote nearable type in android

我目前正在做一个项目,该项目应该 return 时间戳、可接近类型、可接近 ID、温度、接近度,moving/not。

大多数return都可以在estimoke.sdk.Nearable中找到,而nearable类型可以在cloud.model.nearabletype中找到,但问题是我不知道如何调用它我的代码。

我试过了

.append("Type: ").append(NearableInfo(NearableType)).append("\n")

.append("Type: ").append(currentNearable.NearableType).append("\n")

但两个 return 错误,如有任何帮助,我们将不胜感激。

Nearable 类型不在广告数据包中广播,这就是为什么它不是 Nearable class.

的一部分的原因

相反,类型存储在 Estimote Cloud 中,因此您需要使用 Estimote SDK 从那里获取它。您可以通过 EstimoteCloud#fetchNearableDetails 方法做到这一点。您将在回调中获得 NearableInfo 对象,并且该对象具有 type 属性,其中包含您要查找的内容。