Code example for Location

Methods: setAccuracysetLatitudesetLongitude

0
    	sEditor.putFloat("LastLocAccuracy", (float)l.getAccuracy());
    	sEditor.commit();
    } 
     
    public Location getLastLocation() { 
    	Location loc = new Location("LastLocation");
    	loc.setLatitude(settings.getFloat("LastLocLat", (float)40.443181));  // Easter Egg: default value
    	loc.setLongitude(settings.getFloat("LastLocLong", (float)-79.943060));
    	loc.setAccuracy(settings.getFloat("LastLocAccuracy", 100000));
    	return loc;
    } 
     
    public Location getHomeLocation() {
    	if(!settings.getBoolean("haveHomeLocation", false))
    		return null; 
    	 
    	Location loc = new Location("Home");
    	loc.setLatitude(settings.getFloat("HomeLocLat", (float)40.443181));  // Easter Egg: default value
    	loc.setLongitude(settings.getFloat("HomeLocLong", (float)-79.943060));
    	loc.setAccuracy(settings.getFloat("HomeLocAccuracy", 100000));