Closed alexfov closed 3 years ago
The older https://github.com/react-native-geolocation/react-native-geolocation library will be a good fit. It used to be the standard until things moved to services.
But as it says on their homepage, even they are considering migrating to services (but judging by the zero activity for the last 2 years, they might not).
Alternatively, I think https://github.com/timfpark/react-native-location also has an option to change the provider to "standard" (without services). I have not tried using it that way, but it should work.
By default it will choose the playServices location provider if it detects that the dependencies are installed, otherwise, it will use the standard Android version which does not require Google Play Services to be installed.
Edit - I just tried this library with "standard" and it works.
Alternatively, I think https://github.com/timfpark/react-native-location also has an option to change the provider to "standard" (without services). I have not tried using it that way, but it should work.
By default it will choose the playServices location provider if it detects that the dependencies are installed, otherwise, it will use the standard Android version which does not require Google Play Services to be installed.
Edit - I just tried this library with "standard" and it works.
So we have to use another library.. Thank you a lot @yogesch
So we have to use another library.. Thank you a lot @yogesch
This library might also soon have the option to use the standard location manager instead of the services geolocation. Check the maintainer's comments in this issue.
https://github.com/Agontuk/react-native-geolocation-service/issues/227
If phone does not have google play service, it'll automatically switch to standard android implementation. You've to use 5.3.0-beta.1
for this to work.
If phone does not have google play service, it'll automatically switch to standard android implementation. You've to use
5.3.0-beta.1
for this to work.
Is there also a way to manually switch to the standard Android implementation? In case the play service doesn't work as expected?
Not right now, but it can be done by exposing a new option in js side.
Yeah it should be relatively straightforward and very helpful also.
On Wed, 26 May 2021, 17:58 Iftekhar Rifat, @.***> wrote:
Not right now, but it can be done by exposing a new option in js side.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Agontuk/react-native-geolocation-service/issues/273#issuecomment-848727200, or unsubscribe https://github.com/notifications/unsubscribe-auth/AENQRYNPGLRTOJQUE4OKYTDTPTSOPANCNFSM45NA2ZXQ .
Hello and ty for a such useful library. Could you say what should I do if user doesn't have google services? Is there any other way to get geolocation?