com.github.ignition.location.utils.lastlocationfinders
Class IgnitedLegacyLastLocationFinder

java.lang.Object
  extended by com.github.ignition.location.templates.IgnitedAbstractLastLocationFinder
      extended by com.github.ignition.location.utils.lastlocationfinders.IgnitedLegacyLastLocationFinder
All Implemented Interfaces:
ILastLocationFinder

public class IgnitedLegacyLastLocationFinder
extends IgnitedAbstractLastLocationFinder

Legacy implementation of Last Location Finder for all Android platforms down to Android 1.6. This class let's you find the "best" (most accurate and timely) previously detected location using whatever providers are available. Where a timely / accurate previous location is not detected it will return the newest location (where one exists) and setup a one-off location update to find the current location.


Field Summary
protected static String LOG_TAG
           
protected  android.location.LocationListener singeUpdateListener
          This one-off LocationListener simply listens for a single location update before unregistering itself.
 
Fields inherited from class com.github.ignition.location.templates.IgnitedAbstractLastLocationFinder
context, criteria, currentLocation, locationManager
 
Fields inherited from interface com.github.ignition.location.templates.ILastLocationFinder
LAST_LOCATION_TOO_OLD_OR_INACCURATE_EXTRA
 
Constructor Summary
IgnitedLegacyLastLocationFinder(android.content.Context context)
          Construct a new Legacy Last Location Finder.
 
Method Summary
 void cancel()
          Cancel the one-shot current location update.
 void retrieveSingleLocationUpdate()
          Retrieve a one-shot location update.
 
Methods inherited from class com.github.ignition.location.templates.IgnitedAbstractLastLocationFinder
getLastBestLocation, setCurrentLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_TAG

protected static String LOG_TAG

singeUpdateListener

protected android.location.LocationListener singeUpdateListener
This one-off LocationListener simply listens for a single location update before unregistering itself. The one-off location update is returned via the LocationListener specified in setChangedLocationListener.

Constructor Detail

IgnitedLegacyLastLocationFinder

public IgnitedLegacyLastLocationFinder(android.content.Context context)
Construct a new Legacy Last Location Finder.

Parameters:
context - Context
Method Detail

retrieveSingleLocationUpdate

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


cancel

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



Copyright © 2012. All Rights Reserved.