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?