在 Android 中测试 GPS [英] Testing GPS in Android

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

问题描述

您如何在 Android 中测试 GPS 应用程序?我们可以使用 Android 模拟器对其进行测试吗?

How do you test GPS applications in Android? Can we test it using the Android emulator?

推荐答案

是的.

如果您使用 Eclipse ADT 插件进行开发,请在启动模拟器后打开 DDMS 透视图并查找 Emulator Control 视图.如果您想定期发送多个坐标(以模拟特定路线行驶),则有一个位置控制部分,可让您发送固定的纬度和经度坐标,或 GPX(GPS 交换格式)或 KML(锁孔标记语言)文件.

If you develop using the Eclipse ADT plugin, open the DDMS perspective after launching the emulator and look for the Emulator Control view. There is a location controls section that allows you to send fixed latitude and longitude coordinates, or GPX (GPS Exchange Format) or KML (Keyhole Markup Language) files if you want to send multiple coordinates at regular intervals (to simulate traveling a specific route).

或者,您可以简单地 telnet 到模拟器并从命令行使用 geo 命令,该命令支持固定的经纬度坐标以及 NMEA 数据语句:

Alternatively, you can simply telnet to the emulator and use the geo command from the command line, which supports fixed latitude and longitude coordinates as well as NMEA data sentences:

telnet localhost 5554
geo fix -82.411629 28.054553
geo nmea $GPGGA,001431.092,0118.2653,N,10351.1359,E,0,00,,-19.6,M,4.1,M,,0000*5B

这篇关于在 Android 中测试 GPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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