How to check if your app is in the foreground or background

Hello @domhnallohanlon, long time no see.

Recently I have been working on a new app that can detect an online presence by saving an object that can saves every 5 seconds. Then it saves this to firebase under a user ID + session (aka “4tj30tj403igjeidjg sessions”). Other apps can look at the data with that same ID + session to see whether the data was made within 10 seconds of the real time. From there, its just a matter of adding if statements that can tell if the minute, hour, day, day of the month, month and year and creating a label for the if statement.

Happy coding everyone :slight_smile:

Oh I nearly forgot the link :laughing::
https://x.thunkable.com/copy/e883d5bf50bc39fdfd6d635412f9bfd4

Also, if you want me to explain how this works, please vote “YES”.

1 Like