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

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

public class IgnitedGingerbreadLastLocationFinder
extends IgnitedAbstractLastLocationFinder

Optimized implementation of Last Location Finder for devices running Gingerbread and above.

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 oneshot location update to find the current location.


Field Summary
static String SINGLE_LOCATION_UPDATE_ACTION
           
protected  android.content.BroadcastReceiver singleUpdateReceiver
          This BroadcastReceiver 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, LOG_TAG
 
Constructor Summary
IgnitedGingerbreadLastLocationFinder(android.content.Context context)
          Construct a new Gingerbread 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

SINGLE_LOCATION_UPDATE_ACTION

public static String SINGLE_LOCATION_UPDATE_ACTION

singleUpdateReceiver

protected android.content.BroadcastReceiver singleUpdateReceiver
This BroadcastReceiver listens for a single location update before unregistering itself. The oneshot location update is returned via the LocationListener specified in setChangedLocationListener.

Constructor Detail

IgnitedGingerbreadLastLocationFinder

public IgnitedGingerbreadLastLocationFinder(android.content.Context context)
Construct a new Gingerbread 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.