getLastLocation

@RequiresPermission(anyOf = ["android.permission.ACCESS_COARSE_LOCATION", "android.permission.ACCESS_FINE_LOCATION"])
abstract fun getLastLocation(omhOnSuccessListener: OmhSuccessListener, omhOnFailureListener: OmhFailureListener)

Returns the most recent historical location currently available. Will return null if no historical location is available. The historical location may be of an arbitrary age, so clients should check how old the location is to see if it suits their purposes.

Parameters

omhOnSuccessListener

the callback object that will be triggered when completed successfully.

omhOnFailureListener

the callback object that will be triggered when failed.