track

abstract fun track(request: LocationRequest = LocationRequest()): Flow<TrackingStatus>

Start tracking the location.

Either collect the returned flow or use locationUpdates to receive location updates. If you call stopTracking, the flow will no longer emit values until track is called again. But the flow won't be cancelled, so you should cancel it if you no longer need it.

Return

A flow of location tracking updates.

Parameters

request

The location request details.