tags:

views:

108

answers:

2

I m new to android development i dont know to how to get the latitude and longitude of device by programatically?If u can provide some code snippet to get the latitude and longitude.

+2  A: 

You ask the LocationManager.

Will
And if the OP is looking for comprehensive sample code, this does a good job: http://code.google.com/p/foursquared/source/browse/main/src/com/joelapenna/foursquared/location/BestLocationListener.java
Roman Nurik
Hi will, But i dont know how to get the longtitude and latitude using LocationManager.and i m using emultor to test the application.
Kumar
A: 

Have a look at providing mock location data to emulator:

http://d.android.com/guide/topics/location/index.html

disretrospect