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

passiveMode, what does it mean ? #38

Open
kmIndonesia opened this issue Mar 24, 2020 · 1 comment
Open

passiveMode, what does it mean ? #38

kmIndonesia opened this issue Mar 24, 2020 · 1 comment
Labels

Comments

@kmIndonesia
Copy link

I have tried to read the readme and I have tried to search in the 'issues' section, but I can't find documentation about the difference between passiveMode == true and passiveMode == false

could you please help us to explain about this parameter ?

@ocram ocram added the question label Mar 29, 2020
@ocram
Copy link
Contributor

ocram commented Mar 29, 2020

Thanks, good question!

The documentation seems to have little information on the passive mode, you’re right.

From the docs of the Android APIs that we use internally:

A special location [mode] for receiving locations without actually initiating a location fix. […] This […] can be used to passively receive location updates when other applications or services request them without actually requesting the locations yourself.

So your application does not actively cause the operating system to refresh its location information and do work (which costs battery, etc.), but instead just uses the location information that other apps have queried previously.

So if you only need some location, not necessarily the most recent one, and you don’t care about the accuracy that much, i.e. you don’t care if it’s from GPS or Wi-Fi, then passive mode may be for you.

Does that help?

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

No branches or pull requests

2 participants