2013年5月15日 星期三

[Android Map] Change Location of Emulator

See the Article
http://developer.android.com/guide/topics/location/strategies.html#MockData

HighLight


Using the "geo" command in the emulator console



Step1: 執行 cmd 
    執行 cmd ,  cd 到 Android SDK 下的 tools   ie:  C:\Android\tools


Step2: 連上 emulator
     telent localhost 5554 
     5554 是 emulator 的 port , 通常會顯是在 emulator 後面。 
    可用 help 看一下 commands
   

    Windows 7 telnet default 是 off 的, 如要打開 => 控制台 =>開啟或關閉Windows 功能=> 打開telnet


Step3:  使用 geo command  

geo fix -121.45356 46.51119 4392  

或是
   
geo nmea $GPRMC,081836,A,3751.65,S,14507.36,E,000.0,360.0,130998,011.3,E*62


補充 : 
      As an example, a waypoint arrival alarm has the form:
      $GPAAM,A,A,0.10,N,WPTNME*32
     where:
GP Talker ID (GP for a GPS unit, GL for a GLONASS)
AAM Arrival alarm
A Arrival circle entered
A Perpendicular passed
0.10 Circle radius
N Nautical miles
WPTNME Waypoint name
*32 Checksum data


Using Eclipse


Window > Show View > Other > Emulator Control.
有 3 選項  -
1. 傳送 Longitude and Latitude
2. 使用 GPX File
3. 使用 KML File




Using DDMS

在 eclipse 裡也是使用 Emulator control 


補充 :  

沒有留言:

張貼留言