capacitor icon indicating copy to clipboard operation
capacitor copied to clipboard

Use Fused Location Provider for Android

Open JStumpp opened this issue 8 years ago • 5 comments

Getting a location under android is quite difficult. The standard API implemented now in capacitor returns the GPS provider which results in never getting a position indoors. This is not the case under iOS. A better way under Android is the Fused Location Provider which already handles that. Any chance we could migrate to the Fused Location Provider? This would mean we have to include the Google Play services. See docs here: https://developers.google.com/android/reference/com/google/android/gms/location/FusedLocationProviderClient

JStumpp avatar Mar 26 '18 13:03 JStumpp

Interesting, seems like a reasonable change. This thread has some good discussion on it: https://stackoverflow.com/questions/33022662/android-locationmanager-vs-google-play-services?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

mlynch avatar Mar 26 '18 21:03 mlynch

This is a much needed pull request! Great job @JStumpp !

I have taken the liberty to turn this into a capacitor plugin in the meantime while we're waiting for this to be merged into the official capacitor repo https://www.npmjs.com/package/@johannesnormannjensen/capacitor-fused-location

I have made this as a mean for other developers to use it while waiting. Please let me know if you have anything to add to this.

johannesnormannjensen avatar Nov 27 '18 12:11 johannesnormannjensen

This really need to be merged. Actually GPS application are unusable.

wannymiarelli avatar May 17 '19 08:05 wannymiarelli

Please merge this @adamdbradley, @bensperry or someone else of the @ionic-team

Jaspur avatar Jun 19 '19 12:06 Jaspur

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

ionitron-bot[bot] avatar Nov 12 '22 13:11 ionitron-bot[bot]