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

Prompt user to turn on location services if off #353

Open
Arron-Gill opened this issue Feb 4, 2025 · 0 comments
Open

Prompt user to turn on location services if off #353

Arron-Gill opened this issue Feb 4, 2025 · 0 comments
Labels
question Further information is requested

Comments

@Arron-Gill
Copy link

I have a quick question regarding @react-native-community/geolocation and its functionality on Android.

We've recently migrated from react-native-geolocation-service to @react-native-community/geolocation, but we noticed that the getCurrentPosition function is missing a key feature—the ability to prompt users to enable location services if they are turned off.

In react-native-geolocation-service, this was easily handled using the showLocationDialog prop. However, I couldn't find a similar option in @react-native-community/geolocation. It seems to manage permissions but does not handle enabling the location service itself. Others seem to have the same issue.

We’d like to avoid introducing additional dependencies such as react-native-android-location-enabler or reverting to react-native-geolocation-service, as they don't appear to be actively maintained. Implementing this natively via a React Native bridge is an option, but with the new architecture, this could introduce long-term challenges.

Would you have any recommendations on how to achieve this within @react-native-community/geolocation? Any guidance would be greatly appreciated!

@Arron-Gill Arron-Gill added the question Further information is requested label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant