Should the app get the location even if the user unchecks it?

I’m creating a screen using “current location”, but I think there may be a logic error in this component. Once my user activates the switch to get their location, if they clicked it by mistake and want to uncheck it, their location will still be recorded.

Example video

The value is already set. Clear it after disabling the location, refresh the app, and verify if it gets reinserted.

I believe it should work like the switch (True or False), when I uncheck my location, the correct thing would be for the field to be empty.

I even tried it on a form and it continues to record the location, even though it is disabled at the time of sending.

I agree with this, there isn’t a native column for devs to know whether the user has enabled location or not, so unchecking should clear that value.

At first, I thought the same as you. However, I believe that the location button is more about starting or stopping the recording of your location, rather than filling in or clearing the field. I tried clearing the filled value while keeping the button active, and within about 10 seconds, the coordinates field was filled again. This can be very useful if you want to update your user’s position periodically.

If you place the location button within a form and are concerned that your users might accidentally activate it, it would be better to display a warning and a button asking them to clear it. This way, your users will also feel more assured that they are not being tracked by the app.