Class LastKnownLocationInfoManager
- java.lang.Object
-
- org.prebid.mobile.rendering.sdk.BaseManager
-
- org.prebid.mobile.rendering.sdk.deviceData.managers.LastKnownLocationInfoManager
-
- All Implemented Interfaces:
LocationInfoManager
public final class LastKnownLocationInfoManager extends BaseManager implements LocationInfoManager
-
-
Constructor Summary
Constructors Constructor Description LastKnownLocationInfoManager(android.content.Context context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.FloatgetAccuracy()java.lang.LonggetElapsedSeconds()java.lang.DoublegetLatitude()Get the latitude.java.lang.DoublegetLongitude()Get the longitude.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
-
-
-
-
Method Detail
-
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
-
-