-
Notifications
You must be signed in to change notification settings - Fork 238
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
Migrate from android.location API. #6
Comments
This is defiantly a good idea, however, I think we should still allow developers to use the current
We might also need to alter the API to properly support this and other settings. |
how is it easy to support multiple backends, like plain android and google play services? |
I have implemented it in There is then a piece of code which selects which one to use based on the app dependencies and the configuration setting which the user has requested. I've not really dug too much into this libraries code yet, but we can likely use a similar method. |
Isn’t fused location the preferred way to get location on android these days. As implemented by https://github.com/MustansirZia/react-native-fused-location for instance... |
@tijs It is, and that's why this library should support it, however, as noted above it's not always available on all devices so we need to support both. |
Right that seems like a sensible path. So the main package would provide a stable API while the actual location service is provided by a 'plugin' or 'driver', with some defaults out of the box. I've found the way they did this in the LocalForage package very practical. Actually makes it quite easy to provide a custom driver as well. Maybe interesting inspiration? https://localforage.github.io/localForage/#settings-api-setdriver |
Exactly. We need to discuss how this will work exactly, but I think that we will try to use the best API possible by default and let the developer override that if they know they want to use a specific one. Thanks for the link to LocalForge 👍 |
@matt-oakes @tijs I love the ideas of a native interface to be implemented by different providers as well as the |
I think the default should be
That should "do the right thing" with no configuration for most users and avoid the need for users to understand the differences and handle checking for the presence of Google Play Services themselves. |
This comment has been minimized.
This comment has been minimized.
Hi! Are there any updates? |
@nicklockwood No, there are no updates. Contributions are always welcome though. |
let's make it work for most cases, or use Google Services. Maybe add other backends later on. |
why not to try to ask to one of the developers of those modules to join this repo and put here their code in order to help them too maintaining their libs? Do you have any ideas that would let us write less code to implement this feature (that I find really of core importance)? |
I've just seen react-native-geolocation-service is now using react-native-geolocation |
This is for iOS only. |
I will try to work on this change, @matt-oakes @dulmandakh @michalchudziak any suggestion and ideas related to the API.
Is some other team or person working on this change already? |
I have a good background on geolocation features in react native.
|
Hi, I went through other geolocation libraries and feel react-native-geolocation-service seems to have a stable code and almost supports web API spec and react-native-location has implemented a way of using both google play services and android location api but does not match web API spec . I feel better copy android code from react-native-geolocation-service and add a way to use android.location API for non google services devices like they have done it in react-native-location. So that we can keep the current API as it is without making any breaking changes? This requires copying code from other libraries instead of reimplementing here again. What do you say folks, is this approach ok? |
Just out of curiosity, are there still plans to maintain this lib? |
@ravirajn22, were you able to work on the changes? |
Any updates whether this package is planning to implement location updates using play services api ? Looking into the discussion 'react-native-geolocation-service' package for android is using FusedLocationProviderClient's requestLocationUpdates task with a callback for which official doc says 'This method is suited for the foreground use cases' . So any plan for implementing background location updates with this package ? |
Just want to hop in here and see if there has been any updates on this issue? |
Hello guys. Were there any updates on this topic recently? |
Moved to https://github.com/Agontuk/react-native-geolocation-service long back. Very stable. |
I'm stuck on the geolocation access authorization problem on Android with this library. |
Ask your Question
As discussed, we should migrate from android.location API. I'd like to use this issue to start the discussion on potential alternatives.
Reference libraries:
The text was updated successfully, but these errors were encountered: