# Can Thunkable write a geofence?

**URL:** <https://community.thunkable.com/t/can-thunkable-write-a-geofence/953755>\
**Category:** Questions about Thunkable X\
**Created:** [November 5, 2020, 11:05am UTC](https://community.thunkable.com/t/can-thunkable-write-a-geofence/953755 "2020-11-05T11:05:23Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![chayungkul\_k4r](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@chayungkul\_k4r](https://community.thunkable.com/u/chayungkul_k4r)\
**Post date:** [November 5, 2020, 11:05am UTC](https://community.thunkable.com/t/can-thunkable-write-a-geofence/953755/1 "2020-11-05T11:05:23Z")

</div>

Hi, everyone I have something to help. Can Thunkable write a geofence?  
if not, can the app inventer write it?

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [November 5, 2020, 11:56am UTC](https://community.thunkable.com/t/can-thunkable-write-a-geofence/953755/2 "2020-11-05T11:56:31Z")

</div>

Hey! This is a topic touched on occasionally. In short, the answer is yes. In practice it’s only mildly difficult.

## use a dope backend

Both of these can complete the geoqueries in the backend

Alternatively you can code this part

### Backendless

- Easy as heck to use (can share an example)
- Fast but 25$ per month to implement

### 🔥 Firestore

- Hard as F to use
- Fast & free (within very generous limits)

Hm

## do the

---

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [November 5, 2020, 12:21pm UTC](https://community.thunkable.com/t/can-thunkable-write-a-geofence/953755/3 "2020-11-05T12:21:33Z")

</div>

Yes, I’ve built geofencing into my apps (although I just learn that term from this tread).

The biggest barrier I have encountered is that thunkable doesn’t run in the background. If the phone is on and the app is being display, you have a few options. But unless both are true, I don’t think the you will be able to tell if someone is within your fence.

The notification when an app enters your fence area is a bit tricky with Thunkable (vs. 3rd party apps as [jaredgibb](http://community.thunkable.com/u/jaredgibb) suggests).

Within Thunkable, you can use the Firebase Listeners and Data Change blocks to message user only if the app is open. [Keeping all of those asynchronous calls straight](http://community.thunkable.com/t/wrapping-asynchronous-then-do-blocks-into-a-synchronous-function-resolves-unpredictable-results/910511) is tricky (as [jaredgibb](http://community.thunkable.com/u/jaredgibb) indicated). It is free and does not require a Thunkable PRO membership.

You can use [One Signal to send messages to a specific users](http://community.thunkable.com/t/sending-notification-to-specific-user-with-onesignal/150022/61) to send push notifications outside of the app. This requires a paid PRO Thunkable membership. But that doesn’t get you much, since the app must be open to detect entry into the fence.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [November 5, 2020, 1:37pm UTC](https://community.thunkable.com/t/can-thunkable-write-a-geofence/953755/4 "2020-11-05T13:37:34Z")

</div>

Yup. Teds right. But really, you may not want that running 24/7. It would be a battery drain.

You can do this tho!

---

<div class="post-metadata">

**Author:** ![chayungkul\_k4r](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@chayungkul\_k4r](https://community.thunkable.com/u/chayungkul_k4r)\
**Post date:** [November 5, 2020, 3:29pm UTC](https://community.thunkable.com/t/can-thunkable-write-a-geofence/953755/5 "2020-11-05T15:29:21Z")

</div>

Thanks, I read and still I’m confused because I just started to learn

---

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [November 5, 2020, 4:58pm UTC](https://community.thunkable.com/t/can-thunkable-write-a-geofence/953755/6 "2020-11-05T16:58:28Z")

</div>

Telling us what you want your app to do will help us give you more specific suggestions.

---

<div class="post-metadata">

**Author:** ![chayungkul\_k4r](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@chayungkul\_k4r](https://community.thunkable.com/u/chayungkul_k4r)\
**Post date:** [November 5, 2020, 5:53pm UTC](https://community.thunkable.com/t/can-thunkable-write-a-geofence/953755/7 "2020-11-05T17:53:35Z")

</div>

I think there is functionality.  
1.Locate people  
2.tracking people and navigator people  
4.geofence and nontification  
use firebase to collect data.

---

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [November 6, 2020, 11:11am UTC](https://community.thunkable.com/t/can-thunkable-write-a-geofence/953755/8 "2020-11-06T11:11:52Z")

</div>

#1 use the Location sensor  
#2 tracking people (use the map, the location sensor, timer, firebase updates)  
#2 navigating people. This is very difficult in Thunkable. Consider using a link to google maps like this  
#4 This is extremely complicated in Thunkable, but it is possible. you will need to  
a) Define your fence (coordiate list)  
b) check if current coordiates (location sensor) are within the fenced area  
c) notify the user (alert or push)

Again, you have a good idea for an app. But the app will not be easy. I would suggest you trying some simple screens using the following:

1. Map
2. Location Sensor
3. Firebase Save
4. Firebase Get
5. Firebase Add Listener
6. Firebase Data Change
7. One Signal Push notification

Once you know how to use each of these components, try combining them. Then you can ask the group specific questions.

---

<div class="post-metadata">

**Author:** ![chayungkul\_k4r](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@chayungkul\_k4r](https://community.thunkable.com/u/chayungkul_k4r)\
**Post date:** [November 11, 2020, 7:24am UTC](https://community.thunkable.com/t/can-thunkable-write-a-geofence/953755/9 "2020-11-11T07:24:47Z")

</div>

I have to use thunkable or thunkable x, what’s the difference?

---

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [November 11, 2020, 12:09pm UTC](https://community.thunkable.com/t/can-thunkable-write-a-geofence/953755/10 "2020-11-11T12:09:08Z")

</div>

Thunkable “Classic” is no longer supported. It was the original version of Thunkable. You will need to use Thunkable X. The X standard for Cross (X) platform.

---

<div class="post-metadata">

**Author:** ![chayungkul\_k4r](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@chayungkul\_k4r](https://community.thunkable.com/u/chayungkul_k4r)\
**Post date:** [November 12, 2020, 6:32am UTC](https://community.thunkable.com/t/can-thunkable-write-a-geofence/953755/11 "2020-11-12T06:32:53Z")

</div>

ohh ok, Can thunkable retrieve data from another network server?

---

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [November 12, 2020, 9:58am UTC](https://community.thunkable.com/t/can-thunkable-write-a-geofence/953755/12 "2020-11-12T09:58:28Z")

</div>

What do you mean by “another network server?” Thunkable can access a number of online datasources (Firebase, airtable, Google sheets), as well as REST API access.

---

<div class="post-metadata">

**Author:** ![chayungkul\_k4r](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@chayungkul\_k4r](https://community.thunkable.com/u/chayungkul_k4r)\
**Post date:** [November 12, 2020, 10:19am UTC](https://community.thunkable.com/t/can-thunkable-write-a-geofence/953755/13 "2020-11-12T10:19:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chayungkul\_k4r](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@chayungkul\_k4r](https://community.thunkable.com/u/chayungkul_k4r)\
**Post date:** [November 12, 2020, 3:27pm UTC](https://community.thunkable.com/t/can-thunkable-write-a-geofence/953755/14 "2020-11-12T15:27:51Z")

</div>

The device I got, it’s a small device with a gps tracking sensor.

---

<div class="post-metadata">

**Author:** ![drted](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/drted/32/92694_2.png) [@drted](https://community.thunkable.com/u/drted)\
**Post date:** [November 12, 2020, 4:29pm UTC](https://community.thunkable.com/t/can-thunkable-write-a-geofence/953755/15 "2020-11-12T16:29:50Z")

</div>

Well, if you can make the API work, I suppose so. Not rally what thunkable is for, but it could be possible.

Best of luck

---

<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, 12:21pm UTC](https://community.thunkable.com/t/can-thunkable-write-a-geofence/953755/16 "2024-11-08T12:21:39Z")

</div>



---

<div class="post-metadata">

**Author:** ![matt\_conroy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/matt_conroy/32/150843_2.png) [@matt\_conroy](https://community.thunkable.com/u/matt_conroy)\
**Post date:** [December 19, 2024, 5:01pm UTC](https://community.thunkable.com/t/can-thunkable-write-a-geofence/953755/17 "2024-12-19T17:01:10Z")

</div>


