cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Get GPS coordinates on ANDROID TABLET and SMARTPHONE doesn't work

Hello,

I want in my PowerApps application, a button. And when i click on this button i want that application geolocate ( Latitude and Longitude) the user who click on the button. It works good on PC, but on android tablets and smartphone, the button doesn't work... I don't understand why. because, the GPS position icons is activated on both devices, but when i clickl on the application's geolocate button, it doesn't match.

 

This is my formula :

UpdateContext({var_latitude:Location.Latitude});;UpdateContext({var_longitude:Location.Longitude}).

 

Can you help me please ?

I need that it works on tablets and smartphone.

 

1 ACCEPTED SOLUTION

Accepted Solutions
timl
Super User
Super User

Hi @Anonymous 

With a mobile device, Power Apps can automatically disable location services in order to preserve battery life. There are more details here.

https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-enable-disable

Therefore, can you try to enable location services before you reference the signal to see if that makes a difference?

Enable(Location);;
UpdateContext({var_latitude:Location.Latitude});;
UpdateContext({var_longitude:Location.Longitude})

View solution in original post

2 REPLIES 2
gabibalaban
Dual Super User
Dual Super User

Hi @Anonymous ,

Are you sure that PowerApps has rights to use location on your tablet / phone ? This is a common behaviour when powerapps is not allowed to use location on a mobile device ?

 

Hope it helps ! 

timl
Super User
Super User

Hi @Anonymous 

With a mobile device, Power Apps can automatically disable location services in order to preserve battery life. There are more details here.

https://docs.microsoft.com/en-gb/powerapps/maker/canvas-apps/functions/function-enable-disable

Therefore, can you try to enable location services before you reference the signal to see if that makes a difference?

Enable(Location);;
UpdateContext({var_latitude:Location.Latitude});;
UpdateContext({var_longitude:Location.Longitude})

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (4,120)