AccurateLocationTaker

public class AccurateLocationTaker implements LocationListener

Fields

mCircularError

protected float mCircularError

mContext

protected Context mContext

mGpsTakings

protected ArrayList<Location> mGpsTakings

mHandler

protected Handler mHandler

mIsCancelled

protected boolean mIsCancelled

mIsStopped

protected boolean mIsStopped

mLastLocationTime

protected Long mLastLocationTime

mLatAverage

protected double mLatAverage

mLatMin

protected Double mLatMin

mLatSum

protected double mLatSum

mLocationManager

protected LocationManager mLocationManager

mMaxTakeCount

protected Integer mMaxTakeCount

mMaxTakeTimeMillis

protected Long mMaxTakeTimeMillis

mMaxTakenAccuracy

protected Float mMaxTakenAccuracy

mOnGetAccurateLocationListener

protected OnGetAccurateLocationListener mOnGetAccurateLocationListener

mOnGetCurrentAccurateLocationListener

protected OnGetCurrentAccurateLocationListener mOnGetCurrentAccurateLocationListener

mOnProgressUpdateListener

protected OnProgressUpdateListener mOnProgressUpdateListener

mPublishProgressDelayMillis

protected long mPublishProgressDelayMillis

mStartTakeTimeMillis

protected long mStartTakeTimeMillis

mTakeTimeMillis

protected long mTakeTimeMillis

Constructors

AccurateLocationTaker

public AccurateLocationTaker(Context context, Float maxTakenAccuracy, Integer maxTakeCount, Long maxTakeTimeMillis, long publishProgressDelayMillis, String circularErrorStr)
Параметры:
  • context – The context.
  • maxTakeCount – The max count of the GPS taking. If null then count is ignored.
  • maxTakeTimeMillis – The max time for GPS taking (milliseconds). If null then time is ignored.
  • publishProgressDelayMillis – The delay (milliseconds) for publish progress.
  • circularErrorStr – The circular error, may be «CE50», «CE90», «CE95» or «CE98». If null or something other then takes the default value, «CE50».

Methods

cancelTaking

public void cancelTaking()

getAccurateLocation

protected Location getAccurateLocation(float circularError)

getCircularErrorFromString

protected float getCircularErrorFromString(String circularErrorString)

isCancelled

public boolean isCancelled()

isTaking

public boolean isTaking()

onLocationChanged

public void onLocationChanged(Location location)

onProviderDisabled

public void onProviderDisabled(String provider)

onProviderEnabled

public void onProviderEnabled(String provider)

onStatusChanged

public void onStatusChanged(String provider, int status, Bundle extras)

setOnGetAccurateLocationListener

public void setOnGetAccurateLocationListener(OnGetAccurateLocationListener onGetAccurateLocationListener)

setOnGetCurrentAccurateLocationListener

public void setOnGetCurrentAccurateLocationListener(OnGetCurrentAccurateLocationListener onGetCurrentAccurateLocationListener)

setOnProgressUpdateListener

public void setOnProgressUpdateListener(OnProgressUpdateListener onProgressUpdateListener)

startTaking

public void startTaking()

stopTaking

public void stopTaking()

takeLocation

protected void takeLocation(Location location)