Google Nearby Messages - Cancel initial link between devices

前端 未结 1 1894
醉梦人生
醉梦人生 2021-01-16 12:07

I\'m building a app to test Google Nearby Messages API. For that test, I\'m using DISTANCE_TYPE_EARSHOT.

According to this thread Nearby API's Strategy.DISTANCE

相关标签:
1条回答
  • 2021-01-16 12:59

    (I work on the Nearby API)

    Today, Nearby doesn't expose distance directly nor does it provide a way to force "un-pairing" of devices programmatically. We've heard folks want both of these things, the features are on our radar, but we can't comment or commit beyond that.

    As a manual hack, you can clear data on "Google Play Services" to un-pair devices.

    You can get a rough approximation of distance by measuring BLE RSSI if one of the devices is capable of BLE advertising. This will be sensitive to how the device is held, antenna gain and environmental factors but better than random.

    There's not a straight-forward "tape measure" API, though.

    0 讨论(0)
提交回复
热议问题