简体   繁体   English

更改Kontakt SDK时间框架以更新信标距离

[英]Change Kontakt SDK time frame for updating beacon distance

I've been trying to use Kontakt.io's sample Android app to implement a simple app that would connect to a Kontakt beacon and show the beacon details. 我一直在尝试使用Kontakt.io的示例Android应用程序来实现一个简单的应用程序,该应用程序将连接到Kontakt信标并显示信标详细信息。 Now what i noticed is that the beacons are updating very slow ie after almost 2 seconds , however i want it to update after some 400 or 500 milliseconds so that when a beacon device is move here and there then the android screen should show that distance in more fast way. 现在我注意到的是,信标的更新非常缓慢,即在将近2秒钟后更新,但是我希望它在大约400或500毫秒后更新,因此当信标设备在此处和那里移动时,Android屏幕应显示该距离更快捷的方法。 Following is the code from the Scan Activity.Here I am getting the majors of beacons and their distances from the phone. 以下是“扫描活动”中的代码。在这里,我了解到信标的专业及其与手机的距离。 And on update I am updating the first index ie the first beacon detected and getting its distance but it is updating so slow 在更新时,我正在更新第一个索引,即检测到第一个信标并获取其距离,但更新速度很慢

private IBeaconListener createIBeaconListener() {
return new IBeaconListener() {
  @Override
  public void onIBeaconDiscovered(IBeaconDevice iBeacon, IBeaconRegion region) {
    Log.i(TAG, "onIBeaconDiscovered: " + iBeacon.getMajor() + " " + iBeacon.getDistance());
  }

  @Override
  public void onIBeaconsUpdated(List<IBeaconDevice> iBeacons, IBeaconRegion region) {
    Log.i(TAG, "onIBeaconsUpdated: " + iBeacons.get(0).getDistance());

  }

  @Override
  public void onIBeaconLost(IBeaconDevice iBeacon, IBeaconRegion region) {
    Log.e(TAG, "onIBeaconLost: " + iBeacon.toString());
  }
};

I don't know where to change or where to see that after what time the beacon is updating. 我不知道在什么时间更新信标后该在哪里更改或在哪里看到。 Anyone knows it? 有人知道吗?

You can change transmission interval of beacons in kontakt beacon dashboard. 您可以在kontakt信标仪表板中更改信标的传输间隔。 but if you are changing too much it causes major issues with signal stability. 但是如果您更改太多,则会导致信号稳定性出现重大问题。 see here . 看这里

if you want to update 400 or 500 milliseconds, you can change transmission power accordingly. 如果要更新400或500毫秒,则可以相应地更改传输功率。

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

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