BirjuVachhani / locus-android

An Awesome Kotlin Location library to retrieve location merely in 3 lines of code
https://birju.dev/posts/retrieve-location-in-just-3-lines-android/
Apache License 2.0
358 stars 40 forks source link

Update Documentation for LocationRequest Configuration (Release v4.1.1) #82

Open panos-stavrianos opened 1 year ago

panos-stavrianos commented 1 year ago

I recently updated to Release v4.1.1 and encountered some deprecated functions within the location request configuration. The new recommended approach in this release is to use the LocationRequest.Builder for location request configuration. I guess the docs are not updated yet, can you provide an example on how to use it?

Deprecated code snippet:

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