# Location sensor resolution and background capability

**URL:** <https://community.thunkable.com/t/location-sensor-resolution-and-background-capability/1534350>\
**Category:** Questions about Thunkable X\
**Tags:** beginner\
**Created:** [September 29, 2021, 7:40pm UTC](https://community.thunkable.com/t/location-sensor-resolution-and-background-capability/1534350 "2021-09-29T19:40:27Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![sriram.padmanabhan05](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@sriram.padmanabhan05](https://community.thunkable.com/u/sriram.padmanabhan05)\
**Post date:** [September 29, 2021, 7:40pm UTC](https://community.thunkable.com/t/location-sensor-resolution-and-background-capability/1534350/1 "2021-09-29T19:40:27Z")

</div>

Hello,  
I would like to use the location sensor to alert me when I am a certain distance from a particular address. I have a couple of questions

1. Can the location sensor work of the app is not opened?
2. What is the minimum distance it needs to recognize a change?  
Thanks

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [September 29, 2021, 9:18pm UTC](https://community.thunkable.com/t/location-sensor-resolution-and-background-capability/1534350/2 "2021-09-29T21:18:11Z")

</div>

1. No
2. I don’t believe there is a minimum distance. But there is a setting on the location sensor for `maximum age`. This refers to the amount of time that goes by between readings. So if you set `maximum age` to 5000 (5000 milliseconds = 5 seconds) and get the device location again after only 4 seconds, it will use the previous value. If you instead wait 6 seconds and get the device location, it will update to a new location value.

---

<div class="post-metadata">

**Author:** ![sriram.padmanabhan05](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@sriram.padmanabhan05](https://community.thunkable.com/u/sriram.padmanabhan05)\
**Post date:** [September 29, 2021, 9:30pm UTC](https://community.thunkable.com/t/location-sensor-resolution-and-background-capability/1534350/3 "2021-09-29T21:30:53Z")

</div>

Thank you

---

<div class="post-metadata">

**Author:** ![sriram.padmanabhan05](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@sriram.padmanabhan05](https://community.thunkable.com/u/sriram.padmanabhan05)\
**Post date:** [October 5, 2021, 5:37pm UTC](https://community.thunkable.com/t/location-sensor-resolution-and-background-capability/1534350/4 "2021-10-05T17:37:41Z")

</div>

Had another basic question - once we set the maximum age, we have to call getcurrentlocation to get a new position

---

<div class="post-metadata">

**Author:** ![sriram.padmanabhan05](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@sriram.padmanabhan05](https://community.thunkable.com/u/sriram.padmanabhan05)\
**Post date:** [October 5, 2021, 5:40pm UTC](https://community.thunkable.com/t/location-sensor-resolution-and-background-capability/1534350/5 "2021-10-05T17:40:25Z")

</div>

I mean that as a question

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 5, 2021, 6:07pm UTC](https://community.thunkable.com/t/location-sensor-resolution-and-background-capability/1534350/6 "2021-10-05T18:07:21Z")

</div>

> [@sriram.padmanabhan05](#):
>
> Had another basic question - once we set the maximum age, we have to call getcurrentlocation to get a new position?

Yes, correct. The location sensor will not automatically generate data. You have to call it each time but you can add it to a loop or timer.

---

<div class="post-metadata">

**Author:** ![sriram.padmanabhan05](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@sriram.padmanabhan05](https://community.thunkable.com/u/sriram.padmanabhan05)\
**Post date:** [October 5, 2021, 6:11pm UTC](https://community.thunkable.com/t/location-sensor-resolution-and-background-capability/1534350/7 "2021-10-05T18:11:26Z")

</div>

Thanks. And the loop can be added in the opening screen? Sorry to bother you so much

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 5, 2021, 6:23pm UTC](https://community.thunkable.com/t/location-sensor-resolution-and-background-capability/1534350/8 "2021-10-05T18:23:33Z")

</div>

You can place a loop anywhere you like such as inside a `when screen opens` block.

---

<div class="post-metadata">

**Author:** ![sriram.padmanabhan05](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@sriram.padmanabhan05](https://community.thunkable.com/u/sriram.padmanabhan05)\
**Post date:** [October 5, 2021, 6:26pm UTC](https://community.thunkable.com/t/location-sensor-resolution-and-background-capability/1534350/9 "2021-10-05T18:26:01Z")

</div>

Thanks. That helps a lot

---

<div class="post-metadata">

**Author:** ![sriram.padmanabhan05](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@sriram.padmanabhan05](https://community.thunkable.com/u/sriram.padmanabhan05)\
**Post date:** [October 7, 2021, 1:38pm UTC](https://community.thunkable.com/t/location-sensor-resolution-and-background-capability/1534350/10 "2021-10-07T13:38:19Z")

</div>

Is there any way for an alert to be shown when app is ope but in background?

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 7, 2021, 2:19pm UTC](https://community.thunkable.com/t/location-sensor-resolution-and-background-capability/1534350/11 "2021-10-07T14:19:51Z")

</div>

I believe you can use One Signal for that. I haven’t tried it myself, though.

> **[Push Notifications by One Signal](https://docs.thunkable.com/push-notifications-by-one-signal)**

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:15pm UTC](https://community.thunkable.com/t/location-sensor-resolution-and-background-capability/1534350/12 "2024-11-08T13:15:00Z")

</div>


