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!