简体   繁体   English

如何检测设备是否在某个位置?

[英]How to detect if a device is in a location or not?

  • I'm trying to build an android application which a user can use whenever on a bus trip.我正在尝试构建一个 android 应用程序,用户可以在公交车旅行时使用该应用程序。 The user starts the trip by scanning a QR code, but the trip is supposed to be automatically ended, when the user leaves the bus.用户通过扫描二维码开始行程,但应该在用户下车时自动结束行程。

  • I realize this is somewhat similar to the concept of Amazon's cashless stores, but I do not know how to include this feature into an android application.我意识到这有点类似于亚马逊的无现金商店的概念,但我不知道如何将此功能包含到 android 应用程序中。 I also would like to know the hardware that would be required for implementing this.我也想知道实现这一点所需的硬件。

  • Note: I figured we could use Livetracking somehow, but I don't think that would work since there is no determinate way to make sure if the person actually got off the bus or not.注意:我想我们可以以某种方式使用 Livetracking,但我认为这不会起作用,因为没有确定的方法来确定这个人是否真的下车了。

  • Also, I'm not really sure how RFID would work with respect to android devices, so any insight on how to include it, would be appreciated.此外,我不太确定 RFID 如何在 android 设备上工作,因此任何有关如何包含它的见解都将不胜感激。

You can implement RFID feature using NFC(Near Field Communication) protocol.您可以使用 NFC(近场通信)协议实现 RFID 功能。 For detecting if user left bus, you can check if bus is arrived at destination and check if user continues to be at same velocity / accelerometer (compare the velocity with velocity of walking).为了检测用户是否离开公共汽车,您可以检查公共汽车是否到达目的地并检查用户是否继续处于相同的速度/加速度计(将速度与步行速度进行比较)。

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

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