OmhLocation

interface OmhLocation

Abstraction to provide access to Location Provider

Types

Link copied to clipboard
interface Builder

Functions

Link copied to clipboard
@RequiresPermission(anyOf = ["android.permission.ACCESS_COARSE_LOCATION", "android.permission.ACCESS_FINE_LOCATION"])
abstract fun getCurrentLocation(omhOnSuccessListener: OmhSuccessListener, omhOnFailureListener: OmhFailureListener)

Returns a single location fix representing the best estimate of the current location of the device.

Link copied to clipboard
@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.