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

Should use Criteria.ACCURACY_COARSE instead of Criteria.ACCURACY_LOW in setAccuracy #2

Open
GoogleCodeExporter opened this issue Dec 16, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

  Hi Reto,

Thanks for your example project !

It looks like the methode Criteria.setAccuracy does accept only:
Criteria.NO_REQUIREMENT = 0
Criteria.ACCURACY_FINE = 1
Criteria.ACCURACY_COARSE = 2

But in the 'GingerbreadLastLocationFinder' class, you use:
criteria.setAccuracy(Criteria.ACCURACY_LOW);

Criteria.ACCURACY_LOW = 1, the same than Criteria.ACCURACY_FINE !!!

It should be
criteria.setAccuracy(Criteria.ACCURACY_COARSE)

Even worst, setting criteria.setAccuracy(Criteria.ACCURACY_HIGH); throw an 
exception since Criteria.ACCURACY_HIGH (3) > Criteria.ACCURACY_COARSE (2)...

Maybe the Criteria constants should be set as enum or renamed, or something 
else to not be misused...

Thanks,
Seb.

Original issue reported on code.google.com by [email protected] on 28 Jun 2011 at 8:17

@GoogleCodeExporter
Copy link
Author

so accuracy_course is the 1 to use to get correct info and better speed an 
accuracy? lemme know 
summer
thx

Original comment by [email protected] on 15 Jul 2011 at 9:53

@GoogleCodeExporter
Copy link
Author

I agree. This looks like a bug.

Original comment by [email protected] on 12 May 2012 at 10:40

@GoogleCodeExporter
Copy link
Author

This looks like a bug.
Log:
 > java.lang.IllegalArgumentException: accuracy=3
 > at android.location.Criteria.setAccuracy(Criteria.java:223)
 > ...

Original comment by [email protected] on 23 Oct 2013 at 7:31

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

No branches or pull requests

1 participant