How to get GPS time or network time, location.getTime() is returning the wrong device date and time. I've tried some tips on web but no answers yet.
Here's what I have now
locationManager.requestLocationUpdates(
LocationManager.NETWORK_PROVIDER,
MIN_TIME_BW_UPDATES,
MIN_DISTANCE_CHANGE_FOR_UPDATES, this);
Log.d("Network", "Network");
if (locationManager != null) {
location = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
if (location != null) {
latitude = location.getLatitude();
longitude = location.getLongitude();
datetime = location.getTime(); // the return time is from the device time.... not from the gps
Log.d("lat",""+location.getLatitude());
Log.d("long",""+location.getLongitude());
}
}