pretty clear fromt the title, so far I've tried different coordinates but here is an example of what happens:
telnet localhost <port> Trying ::1... Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Android Console: type 'help' for a list of commands OK geo fix 46.498981 11.350230 OK while in the logcat I found this couple:
46.491002 11.351833366666664 when I give this coordinate I read in the logcat from my class implementing location listener (and others for double check):
public class LocationService implements LocationListener { private static final String TAG = "LocationService"; public LocationManager lmr = null; private Navigation SystemService = null; public LocationService(Navigation sservice) { this.SystemService = sservice; } public void startLocationService() { Log.d(TAG, "starting LocationService"); this.lmr = (LocationManager) this.SystemService .getSystemService(Context.LOCATION_SERVICE); this.lmr.requestLocationUpdates(LocationManager.GPS_PROVIDER, 3000, 5, this); } public void stopLocationService() { this.lmr.removeUpdates(this); } /* * (non-Javadoc) * * @see * android.location.LocationListener#onLocationChanged(android.location. * Location) */ @Override public void onLocationChanged(Location location) { location = this.lmr.getLastKnownLocation(LocationManager.GPS_PROVIDER); try { // this code is used to make a location used from the server I am communicating with out of a android.location eu.fbk.dycapo.models.Location loc = new eu.fbk.dycapo.models.Location(); Log.d(TAG, "longitude : " + location.getLongitude()); Log.d(TAG, "latitude : " + location.getLatitude()); loc.setGeorss_point(String.valueOf((double) location.getLongitude()) + " " + String.valueOf((double) location.getLatitude())); loc.setLeaves(Calendar.getInstance().getTime()); loc.setPoint(eu.fbk.dycapo.models.Location.POSI); //send it to the server LocationService.updatePosition(loc); } catch (NullPointerException e) { Log.e(TAG, e.getMessage()); e.printStackTrace(); } } /* * (non-Javadoc) * * @see * android.location.LocationListener#onProviderDisabled(java.lang.String) */ @Override public void onProviderDisabled(String provider) { // TODO Auto-generated method stub } /* * (non-Javadoc) * * @see * android.location.LocationListener#onProviderEnabled(java.lang.String) */ @Override public void onProviderEnabled(String provider) { // TODO Auto-generated method stub } /* * (non-Javadoc) * * @see android.location.LocationListener#onStatusChanged(java.lang.String, * int, android.os.Bundle) */ @Override public void onStatusChanged(String provider, int status, Bundle extras) { // TODO Auto-generated method stub } I think there's something it might be wrong somewhere but I don't understand where nor why, since I've followed android guidelines to implement location listeners here.
thanks