BirjuVachhani / locus-android

An Awesome Kotlin Location library to retrieve location merely in 3 lines of code

Home Page:https://birju.dev/posts/retrieve-location-in-just-3-lines-android/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to increase time interval in location update?

EleshBaraiya opened this issue · comments

How to add time interval

Locus.startLocationUpdates(this) { result ->
        result.location?.let(::onLocationUpdate)
        result.error?.let(::onError)
    }

@EleshBaraiya
You can checkout wiki: Here

Locus.configure {
    request {
        fastestInterval = 1000
        priority = LocationRequest.PRIORITY_HIGH_ACCURACY
        interval = 1000
        maxWaitTime = 2000
    }
}

I think this answers your question. I'm closing this issue for now. Please create a new issue it if it doesn't work for you.