问题描述
你怎么测试在的Android 的GPS应用?我们可以使用 Android模拟器测试它?
How do you test GPS applications in Android? Can we test it using the Android emulator?
推荐答案
是的。
如果你开发使用Eclipse ADT插件,启动仿真器后,打开DDMS透视图,并寻找模拟器控制视图。有一个位置的控制部分,它允许你,如果你想定期发送多个坐标(模拟行驶的特定路由)发送固定的纬度和经度坐标,或GPX(GPS交换格式)或者KML(Keyhole标记语言)文件
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).
另外,你可以简单地远程登录到仿真器和命令行,支持固定的纬度和经度坐标以及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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!