public class POBLocation
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
POBLocation.Source
Enum to define the location source.
|
Constructor and Description |
---|
POBLocation(Location location)
Instantiate an object of POBLocation using the Android's default location object
|
POBLocation(POBLocation.Source locationSource,
double latitude,
double longitude)
Instantiate an object of POBLocation using the location source defined
POBLocation.Source |
Modifier and Type | Method and Description |
---|---|
float |
getAccuracy()
Returns estimated location accuracy in meters when lat/lon are specified and derived from a
device's location services (i.e., type = 1).
|
long |
getLastFixInMillis()
Return the time of this fix, in elapsed real-time since system boot.
|
double |
getLatitude()
Returns the latitude, in degrees.
|
double |
getLongitude()
Returns the longitude, in degrees.
|
POBLocation.Source |
getSource()
Returns the source of the location.
|
public POBLocation(@NonNull POBLocation.Source locationSource, double latitude, double longitude)
POBLocation.Source
locationSource
- location sourcelatitude
- accepts latitude of the locationlongitude
- accepts longitude of the locationpublic POBLocation(@NonNull Location location)
location
- Android's default location objectpublic long getLastFixInMillis()
public float getAccuracy()
public double getLatitude()
All locations generated by the LocationManager
will have a valid latitude.
public double getLongitude()
All locations generated by the LocationManager
will have a valid longitude.
@Nullable public POBLocation.Source getSource()