Location sensor help

Hello, I would like my application to be able to change the label at any time by displaying the lattitude and longitude. However, I can’t do it. How to do ? Here the location sensor can only enter a loop and not be the source like a button.

1 Like

To simplify understanding I would like to be able to do: when location changes then do …

So depending on the location, an action would take place

See and test

Hello, first of all I want to thank you. However, I have the impression that the position is only displayed when the screen opens. Then it doesn’t update … I wish it could update every second but it doesn’t work. I don’t understand.

Sorry, I think it didn’t work as I was indoors to test it. Outdoors it works quite well.

1 Like

Please do not update every second, if you use a mobile phone with a lower system version, it is easy to crash

Hey! Does this work.
As @tony-ycy-program says updating every second could cause your app to crash
So this should not crash. If it does set the 0.66 to a higher number.
You also may want to move the wait 0.66 seconds above the call location_sensor_1]
instead of inside it.