GoogleLocationEngine

open class GoogleLocationEngine(context: Context, looper: Looper?) : LocationEngine

A LocationEngine that uses the Google Play Services Location API.

Parameters

context

used to initialize the FusedLocationProviderClient

looper

looper that is ued by the FusedLocationProviderClient to listen on for location updates

Constructors

Link copied to clipboard
constructor(context: Context, looper: Looper?)

Functions

Link copied to clipboard
open suspend override fun getLastLocation(): Location?

Get last known location. If last location is not available, this method will return null.

Link copied to clipboard
open override fun listenToLocation(request: LocationEngine.Request): Flow<Location>

Listen to location updates.