Forum Discussion
Sharepoint Framework Geolocation
To add to my reply above, we could probably prompt users to turn on location sharing only when they load the page that contains such web parts, via web part's communication with native. Something we could look into.
Again, thanks for reporting the issue!
Luis Esteban Valencia Munoz wrote:
I created today a simple webpart that uses the navigation object from the browser to take the current location of the user using coordinates, it works perfectly fine on the browser.
I wanted to do this as a smal Proof of Concept, we have a customer that wants to create forms for their users, and those users will fill info on the field, but they want to track the location of the user. They will use mainly Android Phones.
So I downloaded the Sharepoint App, and tried navigating to the page with the SPFx webpart that shows the location.
It says, denied, and Its obvious, the Android Sharepoint App itself never requested permissions to access location services.
Possible ways to fix this:
1. Ask Sharepoint App devs if they can request location permissions, in this way, these kind of webparts would work.
2. I tried on the Android OS settings to see if I could explicitly give permissions to that APP for location services and it doesnt seem possible.
2. Any other idea?
Anyone wants to try this? I am open to share the code is very easy,
Thanks
- DeletedJun 07, 2017that seems a good option!