Closed balsikandar-shuttl closed 3 years ago
In Emulator testing for Kitkat and Lollipop
onLocationChanged
keepTracking(true)
`
val trackingDistance = 500f val interval = 10000 val locationRequest = LocationRequest.create() .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY) .setInterval(interval) .setFastestInterval(interval) .setSmallestDisplacement(trackingDistance) val googleServiceConfiguration = GooglePlayServicesConfiguration.Builder() .locationRequest(locationRequest) .fallbackToDefault(true) .ignoreLastKnowLocation(true) .setWaitPeriod(TWO_SECONDS) .build() val defaultProviderConfiguration = DefaultProviderConfiguration.Builder() .requiredTimeInterval(interval) .requiredDistanceInterval(trackingDistance.toLong()) .acceptableAccuracy(5.0f) .acceptableTimePeriod(FIVE_MINUTE) .setWaitPeriod(ProviderType.GPS, TWO_SECONDS) .build() val awesomeConfiguration = LocationConfiguration.Builder() .keepTracking(true) .useGooglePlayServices(googleServiceConfiguration) .useDefaultProviders(defaultProviderConfiguration) .build() locationManager = LocationManager.Builder(applicationContext) .configuration(awesomeConfiguration) .notify(this) .build()`
I have just released the v2.4.1 containing the fix for the issue, please give it a try and feel free to re-open if not resolved.
In Emulator testing for Kitkat and Lollipop
Issue
onLocationChanged
getting triggered every second forkeepTracking(true)
below is my configuration
`