CheckInLocationManager

class CheckInLocationManager(val application: Application)

Location manager used by the check in manager. Periodically polls location after calling startTrackingLocation and stores it in location live data

Constructors

Link copied to clipboard
constructor(application: Application)

Properties

Link copied to clipboard
Link copied to clipboard

Contains the current location of the user. Updating every 5 seconds after calling startTrackingLocation()

Link copied to clipboard

Can be used to mock a location, in which case location updates are ignored and only this location is used

Functions

Link copied to clipboard

Checks if ACCESS_FINE_LOCATION is granted

Link copied to clipboard
fun isEnabled(context: Context): Boolean

Checks if any GPS or NETWORK location providers are enabled

Link copied to clipboard

Checks if location permission is granted and location is enabled by the user

Link copied to clipboard

Starts polling location updates every 5 seconds and storing the result in getLocation() live data.

Link copied to clipboard

Stops polling for location updates