# Location sensor undefined

**URL:** <https://community.thunkable.com/t/location-sensor-undefined/1517835>\
**Category:** Questions about Thunkable X\
**Created:** [September 21, 2021, 11:42am UTC](https://community.thunkable.com/t/location-sensor-undefined/1517835 "2021-09-21T11:42:23Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![team.eps.numeriqueg](https://avatars.discourse-cdn.com/v4/letter/t/5f8ce5/32.png) [@team.eps.numeriqueg](https://community.thunkable.com/u/team.eps.numeriqueg)\
**Post date:** [September 21, 2021, 11:42am UTC](https://community.thunkable.com/t/location-sensor-undefined/1517835/1 "2021-09-21T11:42:23Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/9/b9f054ed4d243f322d4247e22ee247af6bc78178.png)

---

<div class="post-metadata">

**Author:** ![namitnagar](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@namitnagar](https://community.thunkable.com/u/namitnagar)\
**Post date:** [September 21, 2021, 12:03pm UTC](https://community.thunkable.com/t/location-sensor-undefined/1517835/2 "2021-09-21T12:03:26Z")

</div>

Are you trying on pc/laptop or phone

---

<div class="post-metadata">

**Author:** ![team.eps.numeriqueg](https://avatars.discourse-cdn.com/v4/letter/t/5f8ce5/32.png) [@team.eps.numeriqueg](https://community.thunkable.com/u/team.eps.numeriqueg)\
**Post date:** [September 21, 2021, 12:04pm UTC](https://community.thunkable.com/t/location-sensor-undefined/1517835/3 "2021-09-21T12:04:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![team.eps.numeriqueg](https://avatars.discourse-cdn.com/v4/letter/t/5f8ce5/32.png) [@team.eps.numeriqueg](https://community.thunkable.com/u/team.eps.numeriqueg)\
**Post date:** [September 21, 2021, 12:04pm UTC](https://community.thunkable.com/t/location-sensor-undefined/1517835/4 "2021-09-21T12:04:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![namitnagar](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@namitnagar](https://community.thunkable.com/u/namitnagar)\
**Post date:** [September 21, 2021, 12:05pm UTC](https://community.thunkable.com/t/location-sensor-undefined/1517835/5 "2021-09-21T12:05:29Z")

</div>

Why are there do many timers

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [September 21, 2021, 12:20pm UTC](https://community.thunkable.com/t/location-sensor-undefined/1517835/7 "2021-09-21T12:20:17Z")

</div>

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

See this post

> [@Location Sensor Unable to retrieve location with cellular data](https://community.thunkable.com/t/location-sensor-unable-to-retrieve-location-with-cellular-data/1482946/14):
>
> Hi there, Unfortunately, this seems to be an issue with Expo, who provide the framework we use to build apps. ﻿ ﻿You can see discussion of this behavior on Expo’s Github [here](https://github.com/expo/expo/issues/14248). ﻿ ﻿Thunkable team member Jose has deployed a partial fix. ﻿ ﻿Depending on your version of Android, you may need to set EnableHighAccuracy to false for Location Sensor to work as expected on your device. I use Android 11 and I don’t need to do this, but Jose reports needing to do this for Location Sensor to work on A…

---

<div class="post-metadata">

**Author:** ![team.eps.numeriqueg](https://avatars.discourse-cdn.com/v4/letter/t/5f8ce5/32.png) [@team.eps.numeriqueg](https://community.thunkable.com/u/team.eps.numeriqueg)\
**Post date:** [September 21, 2021, 1:43pm UTC](https://community.thunkable.com/t/location-sensor-undefined/1517835/8 "2021-09-21T13:43:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [September 21, 2021, 1:49pm UTC](https://community.thunkable.com/t/location-sensor-undefined/1517835/9 "2021-09-21T13:49:22Z")

</div>

> [@team.eps.numeriqueg](#):
>
> however between each reset of it (every second), it displays undefined

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.

---

<div class="post-metadata">

**Author:** ![team.eps.numeriqueg](https://avatars.discourse-cdn.com/v4/letter/t/5f8ce5/32.png) [@team.eps.numeriqueg](https://community.thunkable.com/u/team.eps.numeriqueg)\
**Post date:** [September 21, 2021, 5:05pm UTC](https://community.thunkable.com/t/location-sensor-undefined/1517835/10 "2021-09-21T17:05:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [September 21, 2021, 5:24pm UTC](https://community.thunkable.com/t/location-sensor-undefined/1517835/11 "2021-09-21T17:24:29Z")

</div>

What about your Thunkable app? What version?

---

<div class="post-metadata">

**Author:** ![team.eps.numeriqueg](https://avatars.discourse-cdn.com/v4/letter/t/5f8ce5/32.png) [@team.eps.numeriqueg](https://community.thunkable.com/u/team.eps.numeriqueg)\
**Post date:** [September 21, 2021, 5:25pm UTC](https://community.thunkable.com/t/location-sensor-undefined/1517835/12 "2021-09-21T17:25:51Z")

</div>

J’ai la bonne version de thunkable (284)

---

<div class="post-metadata">

**Author:** ![team.eps.numeriqueg](https://avatars.discourse-cdn.com/v4/letter/t/5f8ce5/32.png) [@team.eps.numeriqueg](https://community.thunkable.com/u/team.eps.numeriqueg)\
**Post date:** [September 21, 2021, 5:27pm UTC](https://community.thunkable.com/t/location-sensor-undefined/1517835/13 "2021-09-21T17:27:28Z")

</div>

I have version number 284

---

<div class="post-metadata">

**Author:** ![team.eps.numeriqueg](https://avatars.discourse-cdn.com/v4/letter/t/5f8ce5/32.png) [@team.eps.numeriqueg](https://community.thunkable.com/u/team.eps.numeriqueg)\
**Post date:** [September 21, 2021, 5:35pm UTC](https://community.thunkable.com/t/location-sensor-undefined/1517835/14 "2021-09-21T17:35:10Z")

</div>

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

 ![Screenshot_20210921-193234](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/2/7223ff70f8b4a033c872e3fcec436ad334937fc0.jpeg)  
 ![Screenshot_20210921-193221](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/5/05cb67410553a5185966ec514ecda4985402e5c5.jpeg)

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [September 21, 2021, 5:41pm UTC](https://community.thunkable.com/t/location-sensor-undefined/1517835/15 "2021-09-21T17:41:39Z")

</div>

I made a quick app and tested it on my phone

> **[Record\_2021-09-21-20-38-22\_2bbfbfee96a5dfce998f962ebb8b5da3.mp4 (video)](https://drive.google.com/file/d/10zC2dlSfTouzoSJE6cBU2WKaSDp86fPp/view?usp=drivesdk)**
>
> Google Drive file.

This is the code blocks  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/a/aa3f1322d1bd1c51f191d9312235eda2b7e663b4.png)

---

<div class="post-metadata">

**Author:** ![team.eps.numeriqueg](https://avatars.discourse-cdn.com/v4/letter/t/5f8ce5/32.png) [@team.eps.numeriqueg](https://community.thunkable.com/u/team.eps.numeriqueg)\
**Post date:** [September 21, 2021, 5:56pm UTC](https://community.thunkable.com/t/location-sensor-undefined/1517835/16 "2021-09-21T17:56:49Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [September 21, 2021, 6:01pm UTC](https://community.thunkable.com/t/location-sensor-undefined/1517835/17 "2021-09-21T18:01:13Z")

</div>

> [@team.eps.numeriqueg](#):
>
> I was using timer, is this correct?

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](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/6/f623dde4dc575806eae938f6184bfc0c35a4481e.png)

---

<div class="post-metadata">

**Author:** ![team.eps.numeriqueg](https://avatars.discourse-cdn.com/v4/letter/t/5f8ce5/32.png) [@team.eps.numeriqueg](https://community.thunkable.com/u/team.eps.numeriqueg)\
**Post date:** [September 24, 2021, 10:16am UTC](https://community.thunkable.com/t/location-sensor-undefined/1517835/18 "2021-09-24T10:16:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [September 24, 2021, 10:21am UTC](https://community.thunkable.com/t/location-sensor-undefined/1517835/19 "2021-09-24T10:21:02Z")

</div>

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

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/6/56d383859cb1b8b394d5cab30f316d93963e876c.png)

---

<div class="post-metadata">

**Author:** ![team.eps.numeriqueg](https://avatars.discourse-cdn.com/v4/letter/t/5f8ce5/32.png) [@team.eps.numeriqueg](https://community.thunkable.com/u/team.eps.numeriqueg)\
**Post date:** [September 24, 2021, 12:58pm UTC](https://community.thunkable.com/t/location-sensor-undefined/1517835/20 "2021-09-24T12:58:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [September 24, 2021, 1:03pm UTC](https://community.thunkable.com/t/location-sensor-undefined/1517835/21 "2021-09-24T13:03:59Z")

</div>

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.

[Next page](https://community.thunkable.com/t/location-sensor-undefined/1517835.md?page=2)
