Class POBLocation

  • All Implemented Interfaces:

    
    public class POBLocation
    
                        

    A data class representing a geographic location consist of latitude, longitude and location source.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public enum POBLocation.Source

      Enum to define the location source.

    • Constructor Summary

      Constructors 
      Constructor Description
      POBLocation(POBLocation.Source locationSource, double latitude, double longitude) Instantiate an object of POBLocation using the location source defined Source
      POBLocation(Location location) Instantiate an object of POBLocation using the Android's default location object
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      long getLastFixInMillis() Return the time of this fix, in elapsed real-time since system boot.
      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).
      double getLatitude() Returns the latitude, in degrees.
      double getLongitude() Returns the longitude, in degrees.
      POBLocation.Source getSource() Returns the source of the location.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • POBLocation

        POBLocation(POBLocation.Source locationSource, double latitude, double longitude)
        Instantiate an object of POBLocation using the location source defined Source
        Parameters:
        locationSource - location source
        latitude - accepts latitude of the location
        longitude - accepts longitude of the location
      • POBLocation

        POBLocation(Location location)
        Instantiate an object of POBLocation using the Android's default location object
        Parameters:
        location - Android's default location object
    • Method Detail

      • getLastFixInMillis

         long getLastFixInMillis()

        Return the time of this fix, in elapsed real-time since system boot.

        Returns:

        Last Fix in milli seconds

      • getAccuracy

         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). Note that this is the accuracy as reported from the device.

        Returns:

        Estimated location accuracy in meters

      • getLatitude

         double getLatitude()

        Returns the latitude, in degrees.

        All locations generated by the LocationManager will have a valid latitude.

        Returns:

        provides latitude of the location

      • getLongitude

         double getLongitude()

        Returns the longitude, in degrees.

        All locations generated by the LocationManager will have a valid longitude.

        Returns:

        provides longitude of the location