/tripkit/TripKitAndroidUI/com.skedgo.tripkit.ui.locationhelper/LocationHelper

LocationHelper

\ class LocationHelper(context: Context)

A simple wrapper around FusedLocationProviderClient.

It is your responsibility to make sure that your app has requested the correct permissions to get location.

Constructors

LocationHelper constructor(context: Context)

Types

Name Summary
OnLocationFoundListener interface OnLocationFoundListener
Interface definition for a callback that will be called when a location is either found, or an error occurs.

Functions

Name Summary
getCurrentLocation fun getCurrentLocation(listener: LocationHelper.OnLocationFoundListener)
fun getCurrentLocation(listener: (Location) -> Unit, error: (String) -> Unit)
Retrieves the current location.