SetFastestInterval (long milis) does not work

I want to slow down the update speed as soon as I get the exact location for my needs:

@Override public void slowUpdateRate() { /* * Set the update interval */ Dbg.v(TAG,"****************************"); Dbg.e(TAG, "-- SLOW update rate"); Dbg.v(TAG,"****************************"); stopUpdates(); mLocationRequest.setInterval(1500000); mLocationRequest.setFastestInterval(150000); mLocationClient.requestLocationUpdates(mLocationRequest, this); 

The method is called, but I get updates every 3 and a half. I have a ViewPager with a map fragment 2.0, but I did mapFragment.getMap().setMyLocationEnabled(false);

How to slow down updates? Why is FastestInterval not working?


EDIT: I am testing my slow updates in a dummy application provided by Google docs and it is working fine. I added LogCat getFastestInterval and getInterval, and I got the 15 and 30 seconds that I expected in the test context. BUT the update rate is still too high.

+1
source share
1 answer

I got it!

My mistake and may resume in this

DO NOT CALL AGAIN mLocationClient.requestUpdates(mLocationRequest,this);

Also, remember that the fastest default interval is your normal / 6 interval.

+2
source

All Articles