# Is there an event for the app state

**URL:** <https://community.thunkable.com/t/is-there-an-event-for-the-app-state/1012854>\
**Category:** Questions about Thunkable X\
**Created:** [December 1, 2020, 9:28pm UTC](https://community.thunkable.com/t/is-there-an-event-for-the-app-state/1012854 "2020-12-01T21:28:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrbdrmg](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@mrbdrmg](https://community.thunkable.com/u/mrbdrmg)\
**Post date:** [December 1, 2020, 9:28pm UTC](https://community.thunkable.com/t/is-there-an-event-for-the-app-state/1012854/1 "2020-12-01T21:28:49Z")

</div>

Hi  
new user here form Cordova.  
im playing around with the editor and i want to know how thunkable handle these events:

- app in background
- app in foreground
- app is online
- app is offline

Thank you in advance  
already subscripted to pro by the way

---

<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:** [December 1, 2020, 9:41pm UTC](https://community.thunkable.com/t/is-there-an-event-for-the-app-state/1012854/2 "2020-12-01T21:41:50Z")

</div>

There is a block under the DEVICE section to detect online or offline. I don’t believe Thunkable can detect background status, but I’m not 100% on that

---

<div class="post-metadata">

**Author:** ![mrbdrmg](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@mrbdrmg](https://community.thunkable.com/u/mrbdrmg)\
**Post date:** [December 1, 2020, 9:43pm UTC](https://community.thunkable.com/t/is-there-an-event-for-the-app-state/1012854/3 "2020-12-01T21:43:47Z")

</div>

but is it an event? or do i have to manually check?

---

<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:** [December 1, 2020, 10:47pm UTC](https://community.thunkable.com/t/is-there-an-event-for-the-app-state/1012854/4 "2020-12-01T22:47:47Z")

</div>

It’s not a listener. It’s just a conditional block called “device is online?” You can find it in the Device drawer.

![Screen Shot 2020-12-01 at 2.46.42 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/f/5fb249b09ddfc37597d54612afca3207a1be4a7f.png)

So you could use it in a Forever loop with an if/else block or you could check it manually at various times in your code.

---

<div class="post-metadata">

**Author:** ![mrbdrmg](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@mrbdrmg](https://community.thunkable.com/u/mrbdrmg)\
**Post date:** [December 1, 2020, 11:17pm UTC](https://community.thunkable.com/t/is-there-an-event-for-the-app-state/1012854/5 "2020-12-01T23:17:05Z")

</div>

Thank you  
Its not efficient way especially when we are at this day and age.  
Plus its impossible to get real time update of the user connection status without connection events

I was going to ask for the ability to have listeners for external database changes but I guess its not possible.

Hope to see some emprovment in this matter in the near future.

---

<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:** [December 1, 2020, 11:28pm UTC](https://community.thunkable.com/t/is-there-an-event-for-the-app-state/1012854/6 "2020-12-01T23:28:07Z")

</div>

I hear you. The developers seem pretty responsive to feature requests and bug reports. I’d recommend submitting this so it (hopefully) gets addressed.

[https://docs.thunkable.com/bugs-and-feature-requests](https://docs.thunkable.com/bugs-and-feature-requests)

There are some listeners built in to Thunkable including for realtime database/Firebase: [https://docs.thunkable.com/realtime-db](https://docs.thunkable.com/realtime-db).

---

<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:20pm UTC](https://community.thunkable.com/t/is-there-an-event-for-the-app-state/1012854/7 "2024-11-08T12:20:05Z")

</div>


