-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix issues around location in nearby activity #983
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
Conversation
Will be fixing #978 after this is merged. |
} | ||
|
||
// private void turnGPSOn(Context context){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could I ask why this block is commented out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying out something. It doesn't matter now. We have @psh's test to replace ours.
Thanks for submitting this, @maskaravivek ! I'm hoping to test it this weekend if I can, and then maybe we could include it in our release (planned for early next week). Some conflicts need to be resolved though, after the recent test PR merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this on real device running Android 7.0 and works well for me. Happy to merge once conflicts are resolved. :)
Tested this on real device running Android 7.0 and works well for me. Happy to merge once conflicts are resolved. :) |
f5f00e0
to
b9b906e
Compare
@misaochan I have rebased the branch. |
How to reproduce?
The above issue is now fixed.
How do you know?
The above should be hopefully fixed.
The app now stops listening for location updates as soon as the nearby list is populated.
It again registers the location manager when the refresh button is clicked.
App now uses multiple providers to fetch the location.
Why?
GPS_PROVIDER
is usually slower. Now the app would be using bothNETWORK_PROVIDER
for coarse location andGPS_PROVIDER
for finer location. Upon receiving a location update, it will determine if the newer location is better than the last location. If it is, the newer location would be used.Also fixes #982.