Sharepoint Framework Geolocation

Deleted
Not applicable

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?

@Vesa Juvonen 

@Waldek Mastykarz

 

Screenshot_20170605-160118.pngIMG_20170605_160157.jpg

 

Anyone wants to try this? I am open to share the code is very easy,

 

Thanks

6 Replies

It's a great suggestion but one that I'm afraid you can't do much about yourself. As you've noticed, the SharePoint app would have to have permissions to access location services on your device, and even then the question is if it could relay these permissions to the browser control it uses to display web pages. I'd say it's definitely something for the engineering team to have a look at. Have you considered submitting a UserVoice entry with the idea?

Thanks for adding this to the UserVoice! 

Thanks for the feedback Luis! It's a very fair ask and sorry for not keeping close track of the web part features that require certain mobile capabilities. 

 

It might be a little bit tricky from experience point of view to request location information upfront just for the relatively slim possibility of running certain location-needed web parts (say, majority of users dont actually interact with such web parts in the SharePoint mobile app). We will take the request and update the thread if we come up with a good solution and timeline for this. 

 

cc:

@Nate Clinton@Aneetha Jayaraman

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?

@Vesa Juvonen 

@Waldek Mastykarz

 

Screenshot_20170605-160118.pngIMG_20170605_160157.jpg

 

Anyone wants to try this? I am open to share the code is very easy,

 

Thanks


 

that seems a good option!