cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jlister
Level 8

Location.Latitude and Location.Longitude iOS - must close and re-open app on 1st attempt

Hello,

I am using iOS 12 with PowerApps release 3.18094.26. I am using the formula Set(CurrentLatitude,Location.Latitude) on the OnSelect action for a button. The variable, CurrentLatitude is set as the text value in a label. The issue I am experiecing is when opening the application on the first attempt, the app is requesting permission to use location services; however, the Location.Latitude remains blank. Only when I close and re-open the app is the CurrentLatitude populated with the Location.Latitude. As a work-a-round, I thought I could just use the Launch formula to re-launch the app. However, Launch doesn't seem to work when launching an app that is already open.

Any suggestions or ideas on how to handle retrieving Location.Latitude & Location.Longitude on the initial launch in iOS? 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Location.Latitude and Location.Longitude iOS - must close and re-open app on 1st attempt

Hi @jlister,

Just an update - The PowerApps Support Team is investigating this issue, and they are currently releasing a fix with version 3.18101.29 for both Android and iOS which will be live in the stores by this Friday.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

13 REPLIES 13
Highlighted
jlister
Level 8

Possible bug: Location services

The issue I am experiencing is not being able to retrieve Location.latitude and Location.longitude when opening an app on the first launch. I am using PowerApps release 3.18094.26 and tested on iOS 11 and iOS12 with multiple devices. On the initial launch, PowerApps does request to use location services, which I did accept and PowerApps is allowed to "Always use" location services on both devices. The longitude and latitude values are outputted to a label and they appear correctly on all subsequent attempts to launch the app, just not on the initial launch. Please help.

I would like to avoid instructing the users from having to relaunch the app just to use the location services. I hope someone can look into this issue and report back.

Thank you,

John

 

Community Support Team
Community Support Team

Re: Location.Latitude and Location.Longitude iOS - must close and re-open app on 1st attempt

Hi @jlister,

Thanks for your feedback, I have made a test, and the issue is confirmed on my side.

I think this issue is related to Location function, I would post this issue to my product team, if the issue is solved, I would reply here.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Community Support Team
Community Support Team

Re: Location.Latitude and Location.Longitude iOS - must close and re-open app on 1st attempt

Hi @jlister,

Just an update - The PowerApps Support Team is investigating this issue, and they are currently releasing a fix with version 3.18101.29 for both Android and iOS which will be live in the stores by this Friday.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

jlister
Level 8

Re: Location.Latitude and Location.Longitude iOS - must close and re-open app on 1st attempt

Thanks for the quick response.

luuminhvuong93
Level: Powered On

Re: Location.Latitude and Location.Longitude iOS - must close and re-open app on 1st attempt

@v-xida-msft Did this issue got solved? I am still having users having frozen GPS location because of this

Nick_Loenders
Level: Powered On

Re: Location.Latitude and Location.Longitude iOS - must close and re-open app on 1st attempt

@v-xida-msft , @luuminhvuong93 , @jlister 

Hi,

 

with me this works, however the thing is the is replaces the dot with a comma???

 

How can I resolve this?

 

jlister
Level 8

Re: Location.Latitude and Location.Longitude iOS - must close and re-open app on 1st attempt

Nick, I need more information to understand what you are requesting. Can you provide the formula that you are using to collect the location?

Nick_Loenders
Level: Powered On

Re: Location.Latitude and Location.Longitude iOS - must close and re-open app on 1st attempt

Hi @jlister 

 

It is an app where the technician clicks on START when he goes to the client, and a STOP button when it is done at the client and goes to the next one.

When clicking on START this is executed:

Patch(..... , { StartLocatie:"https://www.google.com/maps/dir/" & var_currentLat & "," & var_currentLong } )

 

Where var_currentLat is set when the screen is opened and in the OnVisible I put : UpdateContext({var_currentLat: Location.Latitude})
;UpdateContext({var_currentLong: Location.Longitude})

 

Basically the same happen when he clicks on STOP, but then the field StopLocation is altered in the Sharepoint list.

 

 

jlister
Level 8

Re: Location.Latitude and Location.Longitude iOS - must close and re-open app on 1st attempt

To be clear, instead of receiving a value of "53.2734" for latitude, you are seeing "53,2734"?

Here is how I would begin to troubleshoot this issue. First, I would temporarily insert two labels and set label1's text property to Location.Lattitude and label2's text property to var_currentLat. If the outputs are as expected, then I would start looking at what is happening to the format in Share Point. What data types are the columns in SharePoint? If it is only the latitude getting converted on the stop position and the stop coordinate displayed properly in the app, check to see what is different about the Share Point columns between the start and stop. What is the number of decimal places set to?

 

PS. On a different note. If you prefer, you can set both context variables in one declaration instead of two.

UpdateContext({var_currentLat: Location.Latitude, var_currentLong: Location.Longitude})

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 338 members 6,050 guests
Please welcome our newest community members: