Class A3LLocationRequest

  • All Implemented Interfaces:
    android.os.Parcelable

    public class A3LLocationRequest
    extends java.lang.Object
    implements android.os.Parcelable
    This class provides replication of LocationRequest .
    • Constructor Detail

      • A3LLocationRequest

        @Deprecated
        public A3LLocationRequest()
        Deprecated.
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • getDurationMillis

        public long getDurationMillis()
        Returns:
        The duration of this request. A location request will not receive any locations after it has expired, and will be removed shortly thereafter. A value of Long.MAX_VALUE implies an infinite duration.
      • getExpirationTime

        @Deprecated
        public long getExpirationTime()
        Deprecated.
        Use getDurationMillis() instead. Using this method will return the duration added to the current elapsed realtime, which may give unexpected results. May be removed in a future release.
        Returns:
        long: Returns the duration added to the current elapsed realtime.
      • getFastestInterval

        @Deprecated
        public long getFastestInterval()
        Deprecated.
        Use getMinUpdateIntervalMillis() instead. May be removed in a future release.
        Returns:
        The fastest allowed interval of location updates.
      • getGranularity

        public int getGranularity()
        Returns:
        A3LGranularity of locations returned for this request. This controls whether fine or coarse locations may be returned.
      • getInterval

        @Deprecated
        public long getInterval()
        Deprecated.
        Use getIntervalMillis() instead. May be removed in a future release.
        Returns:
        intervalMillis for the request.
      • getIntervalMillis

        public long getIntervalMillis()
        Returns:
        The desired interval of location updates. Location updates may arrive faster than this interval (but no faster than specified by getMinUpdateIntervalMillis()) or slower than this interval (if the request is being throttled for example).
      • getMaxUpdateAgeMillis

        public long getMaxUpdateAgeMillis()
        Returns:
        The maximum age of an initial historical location delivered for this request. A value of 0 indicates that no initial historical location will be delivered, only freshly derived locations. A value Long.MAX_VALUE represents an effectively unbounded maximum age.
      • getMaxUpdateDelayMillis

        public long getMaxUpdateDelayMillis()
        The longest a location update may be delayed. This parameter controls location batching behavior. If this is set to a value at least 2x larger than the interval specified by getIntervalMillis(), then a device may (but is not required to) save power by delivering locations in batches. If clients do not require immediate delivery, consider setting this value as high as is reasonable to allow for additional power savings.

        For example, if a request is made with a 2s interval and a 10s maximum update delay, this implies that the device may choose to deliver batches of 5 locations every 10s (where each location should represent a point in time ~2s after the previous).

        Support for batching may vary by device type, so simply allowing batching via this parameter does not imply a client will receive batched results on all devices.

        Returns:
        The longest a location update may be delayed.
      • getMaxUpdates

        public int getMaxUpdates()
        Returns:
        The maximum number of updates delivered to this request. A location request will not receive any locations after the maximum number of updates has been reached, and will be removed shortly thereafter. A value of Integer.MAX_VALUE implies an unlimited number of updates.
      • getMaxWaitTime

        @Deprecated
        public long getMaxWaitTime()
        Deprecated.
        Use getMaxUpdateDelayMillis() instead. May be removed in a future release.
        Returns:
        The longest a location update may be delayed.
      • getMinUpdateDistanceMeters

        public float getMinUpdateDistanceMeters()
        Returns:
        The minimum distance required between consecutive location updates. If a derived location update is not at least the specified distance away from the previous location update delivered to the client, it will not be delivered. This may also allow additional power savings under some circumstances.
      • getMinUpdateIntervalMillis

        public long getMinUpdateIntervalMillis()
        Returns:
        The fastest allowed interval of location updates. Location updates may arrive faster than the desired interval (getIntervalMillis()), but will never arrive faster than specified here. FLP APIs make some allowance for jitter with the minimum update interval, so clients need not worry about location updates that arrive a couple milliseconds too early being rejected.
      • getNumUpdates

        @Deprecated
        public int getNumUpdates()
        Deprecated.
        Use getMaxUpdates() instead. May be removed in a future release.
        Returns:
        The maximum number of updates delivered to this request.
      • getPriority

        public int getPriority()
        Returns:
        The A3LPriority of the location request.
      • getSmallestDisplacement

        @Deprecated
        public float getSmallestDisplacement()
        Deprecated.
        Returns:
        The minimum distance required between consecutive location updates. If a derived location update is not at least the specified distance away from the previous location update delivered to the client, it will not be delivered. This may also allow additional power savings under some circumstances.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • isFastestIntervalExplicitlySet

        @Deprecated
        public boolean isFastestIntervalExplicitlySet()
        Deprecated.
        Do not use. May be removed in a future release.
        Returns:
        True.
      • isWaitForAccurateLocation

        public boolean isWaitForAccurateLocation()
        If this request is A3LPriority.PRIORITY_HIGH_ACCURACY, this will delay delivery of initial low accuracy locations for a small amount of time in case a high accuracy location can be delivered instead.
        Returns:
        True if it is required to wait for high accuracy location.
      • toString

        @NonNull
        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • describeContents

        public int describeContents()
        Needed for Parcelling
        Specified by:
        describeContents in interface android.os.Parcelable
        Returns:
        int: 0
      • writeToParcel

        public void writeToParcel​(@NonNull
                                  android.os.Parcel dest,
                                  int flags)
        Flatten this object in to a Parcel.
        Specified by:
        writeToParcel in interface android.os.Parcelable
        Parameters:
        dest - The Parcel in which the object should be written.
        flags - Additional flags about how the object should be written. May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE.