Code example for Location

Methods: getAccuracygetLatitudegetLongitude

0
    // return super.onKeyDown(keyCode, event); 
    // } 
 
    private void update(Location location) {
        mapOverlays.clear();
        int lat = (int) (location.getLatitude() * 1E6);
        int lon = (int) (location.getLongitude() * 1E6);
        final float accuracy = location.getAccuracy();
        GeoPoint point = new GeoPoint(lat, lon);
        mapController.setCenter(point);
        mapOverlays.add(new AccuracyCircleOverlay(point, accuracy));
    } 
 
    private void displayLocationSettings() { 
        SharedPreferences settings = getSharedPreferences(
                IgnitedLocationConstants.SHARED_PREFERENCE_FILE, Context.MODE_PRIVATE);
 
        useGps.setText(getBooleanText(settings.getBoolean(
                IgnitedLocationConstants.SP_KEY_LOCATION_UPDATES_USE_GPS, 
                IgnitedLocationConstants.USE_GPS_DEFAULT))); 
        updates.setText(getBooleanText(settings.getBoolean(