FusedLocation

open class FusedLocation : GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, LocationListener

Interface for using Google's FusedLocationAPI.

Constructors

Link copied to clipboard
constructor(c: Context, callback: FusedLocation.Callback)

Types

Link copied to clipboard
interface Callback

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
The fastest rate for active location updates.
Link copied to clipboard
Link copied to clipboard
val TAG: String = "FusedLocation"
Link copied to clipboard
The desired interval for location updates.

Functions

Link copied to clipboard
Link copied to clipboard
open fun getCurrentLocation(maxTries: Int)
Sets up FusedLocation Updates and chooses the best reading among `maxTries` samples.
Link copied to clipboard
open fun getLastKnownLocation(diffTime: Long, minAccuracy: Float)
Checks FusedLocation's last known location and checks to see if the the time the location was sampled and the accuracy of the sample is within specified limits.
Link copied to clipboard
open fun getLocation(maxtries: Int): Location
Link copied to clipboard
onLocationResult is only called to provide the latest Location result based on the LocationRequest.
Link copied to clipboard
open fun isGPSEnabled(): Boolean
Link copied to clipboard
open fun isInProgress(): Boolean
Link copied to clipboard
Link copied to clipboard
open fun onConnected(connectionHint: Bundle)
Runs when a GoogleApiClient object successfully connects.
Link copied to clipboard
open fun onConnectionFailed(result: ConnectionResult)
Link copied to clipboard
open fun onConnectionSuspended(cause: Int)
Link copied to clipboard
open fun onLocationChanged(location: Location)
Callback that fires when the location changes.
Link copied to clipboard
open fun reset()
Link copied to clipboard
Link copied to clipboard
Function to show settings alert dialog On pressing Settings button will lauch Settings Options
Link copied to clipboard
Requests location updates from the FusedLocationApi.
Link copied to clipboard
Removes location updates from the FusedLocationApi.