PDA

View Full Version : نکته!: چگونه longitude و latitude را در android emulator برای تست به دست آوریم.



farhadfery
سه شنبه 07 آذر 1391, 10:59 صبح
با سلام. یه کلاس برای کار کردن با gps نوشتم و می خواستم تست کنم. که به تین مسله رسیدم حالا latitude و longitude را چطور در ایمولیتور به دست بیارم. که با جستجو دو تا روش را پیدا کردم. اینجا می گذارم. امیدوارم مفید واقع بشود.


There are two ways.

First In Eclipse In Menu Select "Window" then Select "Open Perspective" then Select "DDMS". i.e Window->Open Prespective->DDMS.

You will see on Left Side Devices Panel and on Right Side you will see different tabs. Select "Emulator Control" Tab.

At bottom you will see Location Controls Panel. Select "Manual" Tab.

Enter Longitude and Latitude in Textboxs then Click Send Button. It will send the position to you emulator and the application.

Second is using telnet.

In the run command type this.

telnet localhost 5554
If you are not using windows you can use any telnet client.

After connecting with telnet use the following command to send your position to emulator.

geo fix long lat
geo fix -121.45356 46.51119 4392