com.github.ignition.location.templates
Class IgnitedAbstractLastLocationFinder

java.lang.Object
  extended by com.github.ignition.location.templates.IgnitedAbstractLastLocationFinder
All Implemented Interfaces:
ILastLocationFinder
Direct Known Subclasses:
IgnitedGingerbreadLastLocationFinder, IgnitedLegacyLastLocationFinder

public abstract class IgnitedAbstractLastLocationFinder
extends Object
implements ILastLocationFinder


Field Summary
protected  android.content.Context context
           
protected  android.location.Criteria criteria
           
protected  android.location.Location currentLocation
           
protected  android.location.LocationManager locationManager
           
 
Fields inherited from interface com.github.ignition.location.templates.ILastLocationFinder
LAST_LOCATION_TOO_OLD_OR_INACCURATE_EXTRA, LOG_TAG
 
Constructor Summary
IgnitedAbstractLastLocationFinder(android.content.Context context)
           
 
Method Summary
 android.location.Location getLastBestLocation(int minDistance, long minTime, boolean isPassiveRequest)
          Find the most accurate and timely previously detected location using all the location providers.
 void setCurrentLocation(android.location.Location currentLocation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.github.ignition.location.templates.ILastLocationFinder
cancel, retrieveSingleLocationUpdate
 

Field Detail

context

protected android.content.Context context

locationManager

protected android.location.LocationManager locationManager

criteria

protected android.location.Criteria criteria

currentLocation

protected android.location.Location currentLocation
Constructor Detail

IgnitedAbstractLastLocationFinder

public IgnitedAbstractLastLocationFinder(android.content.Context context)
Method Detail

getLastBestLocation

public android.location.Location getLastBestLocation(int minDistance,
                                                     long minTime,
                                                     boolean isPassiveRequest)
Find the most accurate and timely previously detected location using all the location providers. Where the last result is beyond the acceptable maximum distance or latency create a one-shot update of the current location to be returned using the LocationListener passed in through setChangedLocationListener

Specified by:
getLastBestLocation in interface ILastLocationFinder
Parameters:
minDistance - Minimum distance before we require a location update.
minTime - Minimum time required between location updates.
isPassiveRequest - The method is invoked from a passive location updater.
Returns:
The most accurate and / or timely previously detected location.

setCurrentLocation

public void setCurrentLocation(android.location.Location currentLocation)


Copyright © 2012. All Rights Reserved.