Ejemplo n.º 1
0
 public GeoPoint getLastKnownLocationAsGeoPoint() {
   // Location loc = null;
   // Criteria
   Criteria criteria = new Criteria();
   criteria.setAccuracy(Criteria.ACCURACY_FINE);
   criteria.setAltitudeRequired(false);
   // Ask Last Location
   Location lastKnownLocation =
       locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, true));
   lastFix = lastKnownLocation;
   GeoPoint myGeoPoint = GeoLocHelper.convertLocationAsGeoPoint(lastKnownLocation);
   return myGeoPoint;
 }
Ejemplo n.º 2
0
 public GeoPoint getMyLocation() {
   GeoPoint myGeoPoint = GeoLocHelper.convertLocationAsGeoPoint(lastFix);
   return myGeoPoint;
 }