Code example for Location

Methods: getTime

0
public class SimpleSelectionStrategy implements PositionSelectionStrategy { 
 
	public boolean isPositionRelevant(Location location) {
		Date now = new Date();
 
		long ageInMs = now.getTime() - location.getTime();
 
		if (ageInMs > 2 * 60 * 1000) {
			return false; 
		} 
 
		return true; 
	} 
 
	public boolean isPositionRelevant(Location lastLocation,
			Location currentLocation) {
 
		if (hasMovedUnder100m(lastLocation, currentLocation)) {
			return false; 
		} 
Connect your IDE to all the code out there  Get Codota for Java