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

Selected location mode in isLocationEnabled callback #35

Closed
aliozinan opened this issue May 25, 2018 · 9 comments
Closed

Selected location mode in isLocationEnabled callback #35

aliozinan opened this issue May 25, 2018 · 9 comments

Comments

@aliozinan
Copy link

Hi, thanks for this great module first of all. I'm trying to use FusedLocation to get & follow the device location upon having the location setting switched on and getting the necessary permisson from the user (on Android). All is working ok except when the user selects a different mode than high accuracy. Is it possible if isLocationEnabled callback would provide the selected mode so that the we can redirect the user to right setting?

@c19354837
Copy link
Owner

There are 4 modes: gps & network, gps only, network only, off.

Is this what you want?

@aliozinan
Copy link
Author

Yes, I want to get the mode user selects on the gps settings page and returns to my app on this call back, so I can show a warning that "high accuracy" (gps & network) will be recommended to use the app, in short words.

@c19354837
Copy link
Owner

I'll add a new API like getLocationMode() => numberand the return code could be one of 0 - 'off', 1 - 'gps', 2 - 'network', 3 - 'gps & network'

For backward compatibility, I cannot change the isLocationEnabled.

@aliozinan
Copy link
Author

This would be great. I'll be following the updates. Thanks!

@c19354837
Copy link
Owner

V1.4.4 is available!

Now you can use getLocationMode() instead of isLocationEnable()

@aliozinan
Copy link
Author

great news, and so fast! thank you very much :)

@aliozinan
Copy link
Author

aliozinan commented Feb 10, 2019

Hi, re-opening the issue for another question about the topic : is it possible to have a listener for the location mode change? Right now I'm able to listen if the location setting is switched on/off but not for the "location mode setting changed" event.

@c19354837 c19354837 reopened this Feb 12, 2019
@c19354837
Copy link
Owner

addLocationModeListener() is available in V1.7.2

@aliozinan
Copy link
Author

greatly appreciated, thanks a lot! :)

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

No branches or pull requests

2 participants