检测设备是否具有GPS [英] Detect if Device has GPS

查看:99
本文介绍了检测设备是否具有GPS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何检测GPS是否可用? p

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

解决方案

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




  • 如果有效高度存在,位置最有可能已经使用GPS计算

  • 否则,GPS尚未拾取任何信号或者它不存在。



无论如何,iOS Apple对于所有位置提供商都有单一接口,因为他们打算让开发人员在准确性方面表达他们的要求,所使用技术的控制应留给操作系统。


How to detect if GPS is available?

The iPod touch and iPad WiFi version don't have GPS, they have something else based on WiFi. Anyway, how to know if GPS is available? Or how to detect iPod Touch or iPad Wifi model?

解决方案

This is a common difficulty on iOS... One way would be to get a location and check if the altitude is present.

  • if a valid altitude is present, the position has most probably been computed using GPS
  • else either the GPS has not picked-up any signal yet or it is not present.

Anyway on iOS Apple has a single interface for all location providers because they intend the developers to express their requirements in terms of accuracy, the control of the technology used should be left to the OS.

这篇关于检测设备是否具有GPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆