in my project , i use GoogleApiClient and locationRequest to get current location and update it periodically after certain interval , I know that there is difference between setInterval and setFastestInterval and
interval is variable that i change from my app settings and has the values of
so I call this :
public int interval = 1 * 1000;
locationRequest.setFastestInterval(interval);
locationRequest.setInterval(interval);
switch (interval_index)
{
case 0:
interval = 1 * 1000;
break;
case 1:
interval = 1 * 60 * 1000;
break;
case 2:
interval = 5 * 60 * 1000;
break;
case 3:
interval = 10 * 60 * 1000;
break;
case 4:
interval = 30 * 60 * 1000;
break;
}
if i set interval for example to 30 minutes i get updates after 5 minutes for example , it is not constant time but i get updates randomly so why ?