Class LastKnownLocationInfoManager
- java.lang.Object
-
- org.prebid.mobile.rendering.sdk.BaseManager
-
- org.prebid.mobile.rendering.sdk.deviceData.managers.LastKnownLocationInfoManager
-
- All Implemented Interfaces:
LocationInfoManager,Manager
public final class LastKnownLocationInfoManager extends BaseManager implements LocationInfoManager
-
-
Constructor Summary
Constructors Constructor Description LastKnownLocationInfoManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Dispose manager and release all necessary resources.java.lang.FloatgetAccuracy()java.lang.LonggetElapsedSeconds()java.lang.DoublegetLatitude()Get the latitude.java.lang.DoublegetLongitude()Get the longitude.voidinit(android.content.Context context)Initialize manager.protected booleanisBetterLocation(android.location.Location location, android.location.Location currentBestLocation)Determine whether one Location reading is better than the current Location fixbooleanisLocationAvailable()voidresetLocation()-
Methods inherited from class org.prebid.mobile.rendering.sdk.BaseManager
getContext, isInit
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.prebid.mobile.rendering.sdk.Manager
getContext, isInit
-
-
-
-
Method Detail
-
init
public void init(android.content.Context context)
Description copied from class:BaseManagerInitialize manager.- Specified by:
initin interfaceManager- Overrides:
initin classBaseManager- Parameters:
context- the context for which manager will be initialized.- See Also:
LocationListener
-
resetLocation
public void resetLocation()
- Specified by:
resetLocationin interfaceLocationInfoManager
-
isBetterLocation
protected boolean isBetterLocation(android.location.Location location, android.location.Location currentBestLocation)Determine whether one Location reading is better than the current Location fix- Parameters:
location- The new Location that you want to evaluatecurrentBestLocation- The current Location fix, to which you want to compare the new one
-
getLatitude
public java.lang.Double getLatitude()
Description copied from interface:LocationInfoManagerGet the latitude.- Specified by:
getLatitudein interfaceLocationInfoManager- Returns:
- the latitude
- See Also:
LocationListener
-
getLongitude
public java.lang.Double getLongitude()
Description copied from interface:LocationInfoManagerGet the longitude.- Specified by:
getLongitudein interfaceLocationInfoManager- Returns:
- the longitude
- See Also:
LocationListener
-
getAccuracy
public java.lang.Float getAccuracy()
- Specified by:
getAccuracyin interfaceLocationInfoManager
-
getElapsedSeconds
public java.lang.Long getElapsedSeconds()
- Specified by:
getElapsedSecondsin interfaceLocationInfoManager
-
isLocationAvailable
public boolean isLocationAvailable()
- Specified by:
isLocationAvailablein interfaceLocationInfoManager
-
dispose
public void dispose()
Description copied from class:BaseManagerDispose manager and release all necessary resources.- Specified by:
disposein interfaceManager- Overrides:
disposein classBaseManager- See Also:
LocationListener
-
-