-
Notifications
You must be signed in to change notification settings - Fork 6
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
[feat] adding basic geolocation #13
base: master
Are you sure you want to change the base?
Conversation
|
I believe that we can live with one location retrieved every 1 or 2 minutes. Most of the visited places will be indoor places, so we can also rely on Google Play services to locate the phone with minimum battery consumption (by using alternative location technology), if available on Flutter. |
Geolocator package already uses Google Play services (at least on Android, the implementation being a FusedLocationProviderClient), so that should do it 😃 |
The app has asked for location permission, there is no bug. |
For now, the app requests a location every 60 seconds; each time a location is received, it is printed on the logs. |
Nothing is printed on the log. |
Have you tried to see if it works even if you close the app, or switch to another app on Android? |
I launched the app, switched to a browser, and it seems that it gathers locations while in background (tested on Android 6)
|
Good, could you also check if this takes more than 15 minutes, as Android seems to idle apps if they are not on the foreground. |
What would we do if this takes more than 15 minutes? |
You mean if it doesn't take more than 15 minutes? |
Well, the more locations we have, the most accurate our results will be. |
… VisitedPlacesComputer
…y ignoring parser cache
…rent day While computing locations and visited places to display on the visitedPlacesCard component, which is meant to show map elements for the present day only, we filter locations to retain those from present day.
Using geolocator package, the app receives a location every ~5 seconds (if the user consents + if geolocation is enabled on the phone).