I am new to Android programming and was referring a Programmers’ guide to know more about how to use the GPS functionality of a phone. According to the guide-
Because you are working on a software-based emulator, and not on a real device, the
presence of GPS hardware has to be simulated. In this case, Android provides a file in
the adb server that simulates having GPS hardware. The file is located at
data/misc/location/provider_name, where provider_name represents the location information provider. The provider that Android supplies to you is data/misc/location/gps
To check this, I ran the adb shell, and navigated to the data/misc directory. But there is no location directory inside that.
And when I try to use LocationManager in my program with either LocationManager.GPS_PROVIDER or LocationManager.NETWORK_PROVIDER, I get the exception that Provider “gps”/”network” unknown.
Is this related to there being no location directory in the data/misc? If yes, then how can I get a location provider?
In your Eclipse open DDMS , in that u will find Emulator control, there u will find Lang and Lat u can change that values.
and You can find location using location manager class and change the value of lat and lag in ddms..