2

如何检测 GPS 是否可用?

iPod touch 和 iPad WiFi 版本没有 GPS,它们有基于 WiFi 的其他东西。无论如何,如何知道 GPS 是否可用?或者如何检测 iPod Touch 或 iPad Wifi 型号?

4

3 回答 3

2

这是 iOS 上的常见困难......一种方法是获取位置并检查高度是否存在。

  • 如果存在有效高度,则该位置很可能是使用 GPS 计算的
  • 否则 GPS 尚未接收到任何信号,或者它不存在。

无论如何,在 iOS 上,Apple 为所有位置提供者提供了单一界面,因为他们希望开发人员在准确性方面表达他们的要求,所使用技术的控制权应留给操作系统。

于 2013-02-02T19:55:56.257 回答
1

尚不确定我的解决方案是否会涵盖所有设备……但是……我要做的是询问设备是否具有蜂窝连接(知道 iOS 设备是否具有蜂窝数据功能)。如果是这样,它很可能也有 GPS。不确定这是否会正确覆盖每个设备,但至少我的测试设备被正确检测到。

于 2016-09-28T13:26:25.213 回答
0

To be 100% sure that it is a GPS loaction, check for attribute course. if this is valid then its from GPS. but when not moving course is invalid too.
you can use that condition as initial trigger that now you have GPS.

If you need an initial valid GPS when not moving, check for vertical accuracy < 100 and horicontal < 50m

于 2013-02-02T21:31:52.510 回答