Is there an event for the app state

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

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


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

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

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.

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.

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

There are some listeners built in to Thunkable including for realtime database/Firebase:

1 Like