com.github.ignition.location.templates
Interface ILastLocationFinder

All Known Implementing Classes:
IgnitedAbstractLastLocationFinder, IgnitedGingerbreadLastLocationFinder, IgnitedLegacyLastLocationFinder

public interface ILastLocationFinder

Interface definition for a Last Location Finder. Classes that implement this interface must provide methods to find the "best" (most accurate and timely) previously detected location using whatever providers are available. Where a timely / accurate previous location is not detected, classes should return the last location and create a one-shot update to find the current location. The one-shot update should be returned via the Location Listener passed in through setChangedLocationListener.


Field Summary
static String LAST_LOCATION_TOO_OLD_OR_INACCURATE_EXTRA
           
static String LOG_TAG
           
 
Method Summary
 void cancel()
          Cancel the one-shot current location update.
 android.location.Location getLastBestLocation(int minDistance, long minTime, boolean passiveRequest)
          Find the most accurate and timely previously detected location using all the location providers.
 void retrieveSingleLocationUpdate()
          Retrieve a one-shot location update.
 

Field Detail

LOG_TAG

static final String LOG_TAG
See Also:
Constant Field Values

LAST_LOCATION_TOO_OLD_OR_INACCURATE_EXTRA

static final String LAST_LOCATION_TOO_OLD_OR_INACCURATE_EXTRA
See Also:
Constant Field Values
Method Detail

getLastBestLocation

android.location.Location getLastBestLocation(int minDistance,
                                              long minTime,
                                              boolean passiveRequest)
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

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

cancel

void cancel()
Cancel the one-shot current location update.


retrieveSingleLocationUpdate

void retrieveSingleLocationUpdate()
Retrieve a one-shot location update.



Copyright © 2012. All Rights Reserved.