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

Add support for getCurrentLocation #4

Merged
merged 3 commits into from
Apr 14, 2021

Conversation

alexvanyo
Copy link
Contributor

This PR adds support for FusedLocationProviderClient.getCurrentLocation which was added in version 17.1.0: https://developers.google.com/android/guides/releases#september_23_2020

One question I had looking at the current implementation, is why not make use of the Play Services integration module from coroutines?

For consistency, I stuck with the current approach with suspendCancellableCoroutine in this PR.

@codecov-io
Copy link

Codecov Report

Merging #4 (60cc385) into main (e2224f6) will increase coverage by 0.74%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main       #4      +/-   ##
==========================================
+ Coverage   87.38%   88.13%   +0.74%     
==========================================
  Files           4        4              
  Lines         111      118       +7     
  Branches        5        5              
==========================================
+ Hits           97      104       +7     
  Misses         12       12              
  Partials        2        2              
Impacted Files Coverage Δ
...src/main/java/com/patloew/colocation/CoLocation.kt 44.44% <ø> (ø)
...main/java/com/patloew/colocation/CoLocationImpl.kt 92.53% <100.00%> (+0.87%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e2224f6...60cc385. Read the comment docs.

Copy link
Owner

@patloew patloew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution. Please check the comments.
Will try to use kotlinx-coroutines-play-services for the next release, thanks for pointing it out.

@alexvanyo alexvanyo requested a review from patloew April 13, 2021 23:33
@patloew patloew merged commit 191eedd into patloew:main Apr 14, 2021
@alexvanyo
Copy link
Contributor Author

Thanks @patloew !

@alexvanyo alexvanyo deleted the av/current-location branch April 14, 2021 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants