1

OnLocationChanged is not always called according to setFastestInterval() value. I have set 1 minute for fastestInterval. But OnLocationChanged sometimes called after 2-3 minutes. I have checked this, while i was in moving state with my phone.

Below code & link I have tried, but didn't get any suitable solution. Is there any more suitable solution for this problem?

I have tried this link

Please see my code snippet below:-

private var mLocationProvider: FusedLocationProviderApi? = null

mLocationProvider = LocationServices.FusedLocationApi
        mLocationRequest = LocationRequest()
        mLocationRequest!!.interval = 1000 * 60 * 1  // 1 min
        mLocationRequest!!.fastestInterval = 1000 * 60 * 1 // 1 min
        mLocationRequest!!.priority = LocationRequest.PRIORITY_HIGH_ACCURACY
Saikat Das
  • 21
  • 1
  • Even somebody can give me any explanation, why this is happening?? It would be enough. Because I just have to send it to the client. – Saikat Das Nov 05 '18 at 13:26
  • 2
    From LocationRequest docs: "All location requests are considered hints, and you may receive locations that are more/less accurate, and faster/slower than requested." –  Nov 05 '18 at 14:09

0 Answers0