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

Preferences: getLong() for Lat/Lng + follow_location_changes #11

Open
GoogleCodeExporter opened this issue Apr 8, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

1. in PlacesUpdateService and PassiveLocationChangedReceiver, the type for 
latitude/longitude values stored in SharedPreferences is long. This causes the 
stored values to be clipped losing the decimals.

=> Needs conversion to float, or to be multiplied by 1E6 (microdegrees): 
save in SharedPreferences with prefs.putInt(lat * 1E6)
use with loc.setLatitude(prefsLat / 1E6)
this would be more consistant with GeoPoint's getLatitudeE6() and 
getLongitudeE6() 

2. Compared to this (great!) tutorial, I actually implemented 
SP_KEY_FOLLOW_LOCATION_CHANGES into a Preferences activity. When set to false, 
it creates an
IllegalArgumentException: Receiver not registered 
in disableLocationUpdates() when calling 
unregisterReceiver(locProviderDisabledReceiver)

=> Needs verification or try/catch.

Thanks for this very helpful tutorial. I have also implemented many of the 
issues reported here...

Original issue reported on code.google.com by mudar.no...@gmail.com on 5 Dec 2011 at 11:24

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