web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Apps
Answered

Function Location

(0) ShareShare
ReportReport
Posted on by 12
Because the Location function does not return null, or, empty, or, 0, when the cell phone location is turned off.
 
I have an application that needs to check if the cell phone's location is enabled. To do this, I use a Timer control, and in OnTimerEnd I added the Location.Latitude function, to check every 1 minute if the cell phone still has the location enabled. When I disabled the cell phone's location, I noticed that it returns the last location obtained, and does not return null, empty, or 0. I expected that when I disabled the cell phone's location, it would return null. I found that at runtime, the Location function cannot check the current location condition of the cell phone. If you disable and enable the cell phone's location, the Location function cannot evaluate this condition. The Location function does not have a native method to check whether the location is enabled or disabled, or an event to detect changes in the location permission. This condition prevents validation from being performed. Is there another way to do this?
 
 
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,442 Super User 2025 Season 2 on at
    Hi,
     
    Can you clarify what the question is so we can help.
     
    Cheers
  • Verified answer
    WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at
    All of what you posted is true and this is an issue for the device, not Power Apps, which can only request the Location data from the device. What I suspect is happening is that the device is treating disabled location the same as no GPS signal (you are in a tunnel) and simply returns the last valid location.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard