How to obtain longitude and latitude using GPS in Android

Source: Internet
Author: User

 

In Android, GPS cannot be used to obtain longitude and latitude. solution:

Summary:

1. According to the Internet, two ways can be used to send latitude and longitude information to the simulator to simulate the satellite's receipt of latitude and longitude information:
(1) In ddms, by setting the latitude and longitude, and sending, the latitude and longitude can be obtained in the simulator, and all applications in the simulator use it as the latitude and longitude of the local machine.
(2) In some cases, you cannot set the longitude and latitude in ddms. Therefore, you need to telnet localhost 5444 in cmd to enter the 5444 simulator (This number may change) -- note that the telnet service is not enabled in win7, so you need to enter the control panel/Program/Enable or disable the WINDOWS function/check the telnet server and client to start the telnet service. Then set the longitude and latitude in the form of GEO fix longitude and latitude to achieve the same effect.

2. The second case is not mentioned on the Internet for the time being, but many people will soon have this problem.
With the release of the new version of the API, many previous programs cannot run on the new version, such as GPS. Therefore, we recommend that you create an earlier version of AVD to run these old programs. If not, use the preceding method to set the longitude and latitude!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.