Location sensor undefined

Hello, I have created an application. When a screen opens, a timer starts allowing in a label to enter the lattitude and the longitude. However, I just realized that they appear every second between cut by “undefined”. Where can this come from ??? I do not understand

1 Like

Are you trying on pc/laptop or phone

I wish I could make the latitude and longitude change instantly and permanently in defined labels.

On the phone because it is on the phone that they must work next

Why are there do many timers

There was an issue with location sensor which was resolved but might need that you apply other settings.

See this post

I think we did not understand each other. The latitude and longitude is found, however between each reset of it (every second), it displays undefined

1 Like

This is what I understood and the post I shared has the solution. You also need to be sure you are on the latest Thunkable Live App which is version 284 for Android and 283-5 for iOS.

Re, the problem is not resolved and “EnableHighAccuracy” is already false. I do not know what to do

1 Like

What about your Thunkable app? What version?

J’ai la bonne version de thunkable (284)

I have version number 284

Voilà ce qu’il se passe, l’application fait alterner le label entre : undefined et les bonnes latitudes et longitudes


I made a quick app and tested it on my phone

This is the code blocks
image

perfect thank you. How can I make this happen automatically without having to click a button (the latitude and longitude change automatically every second). I was using timer, is this correct?

1 Like

Yes that is correct. Just remember to update the two labels inside the GetCurrentLocation block and always test for errors. If the sensor is busy or was not fast enough to respond, it will give an error and both latitude and longitude will become undefined.

[Edit]
I updated my project and the code works will with the Timer. See updated code

image

Hello again, it looks like everything is working fine. However, I wonder if all devices find the same locations? Or close? Because it seems that my phone is often undecided on the location: up to 0.002 difference in latitude (quite a few meters anyway) and longitude from one second to the next.

1 Like

Try playing with the High Accuracy option in the Location Sensor setting page.

image

It’s not ok with enabledhigh and with not enabledhigh.
And two students can’t download app. I don’t know this problem

1 Like

Unfortunately not enough information on the download issue to give any suggestion.

Are all students download the same single copy received by email or each student has own account and has separate email and download link?

It is worth remembering that download link are only valid for 24 hours.