How to get latitude and longitude without using internet?

view story

http://stackoverflow.com – Can we get device's current latitude and longitude with out using internet? I am using following codes.. I am triggering the location listener after the button click. locationListener = new MyLocationListener(); location.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 5000, 20, locationListener); private class MyLocationListener implements LocationListener { @Override public void onLocationChanged(Location loc) { longitude = String.valueOf(loc.getLongitude()); latitude = String.valueOf(loc.getLatitude()); (HowTos)