I am trying to find current location, and this is my code.
LocationManager mlocManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
Location location =new Location(mlocManager.GPS_PROVIDER);
System.out.println("***longitude **"+location.getLongitude());
System.out.println("***latitude **"+location.getLatitude());
but when i run app it always display 0.0
can anyone see the problem?
after writing this statement if you put your cursor over Location You will come to know extact meaning of this statement.
As per Google Doc
You need to fire
requestLocationUpdateto get Lat & lon(If any).Also since you are running this example on Emulator.You will need to emulate send Lat & Lon
manually.