Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I adjust interval 1 second ,why it does not work #1097

Open
EmptyPages opened this issue Oct 17, 2023 · 1 comment
Open

I adjust interval 1 second ,why it does not work #1097

EmptyPages opened this issue Oct 17, 2023 · 1 comment

Comments

@EmptyPages
Copy link

i called the method
passiveLocationManager.requestLocationUpdates(LocationManager.PASSIVE_PROVIDER, 1000, 0, passiveLocationListener);
towerLocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 1000, 0, towerLocationListener);
gpsLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000, 0, gnssLocationListener);
moreover i called the mehod
PreferenceHelper.getInstance().setMinimumLoggingInterval(1);

but Android Studio log show this, interval value about 5 socond , it is different value of different device
image

@mendhak
Copy link
Owner

mendhak commented Oct 22, 2023

That might be normal if the provider is being turned off between fixes, it takes a few seconds to set up the alarm, receive the alarm, start the provider(s), then wait for a fix. You could try the "Keep GPS on between fixes" option and then the provider should stay on. Then the only delay becomes the alarm being set up and received.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants