tripkit-android / com.skedgo.tripkit.ui.locationhelper / LocationHelper

LocationHelper

class LocationHelper

A simple wrapper around FusedLocationProviderClient.

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

Types

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

Constructors

Name Summary
<init> A simple wrapper around FusedLocationProviderClient.LocationHelper(context: Context)

Functions

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