How to store data when user is offline

there is a snippet for it they dont manage

1 Like

There Should be One User Online

Same thing like this

3 Likes

Please someone help me… I’m still stuck on this problem. I want to store data in airtable as “Offline” when user gets disconnected from internet connection and I’m using “onDisconnect” to store data as “Offline” but it is not storing data because it is an event which gets triggered when there is no internet. Is there any other solution?

i think you must use a clock and for every 5 second store user time to airtable, and when user goes offline, you will know that what last time was ?

1 Like

I don’t want to see last seen, I just want to know whether the user is online or offline in airtable. And I don’t need a Clock component to check internet every 5 seconds because there is already “On Connect” and “On Disconnect” event available but it doesn’t get stored when the user disconnects from the internet. That is the problem.

1 Like

I think you have to go to the other side of the connection. You should search there for getting response of airtable member’s status.

1 Like

when you disconnect from internet, then on disconnect you can only do things in app, not online, simple thing you are not understanding, on disconnect how you will store online any data,

1 Like

What do you mean? :sweat_smile:

I’ve understood brother and I know that’s why I’m here asking for a solution. The “on disconnect” event is triggered when the user disconnects from the internet, and we cannot store anything in an online database, I know that. I just need another way to store data as “Offline” when user disconnects from internet.

store data as “Offline” when user disconnects from internet.

This logic sounds easy but it’s not.

If you want to know if someone is on- or offline “in airtable” (as you wrote), you have to code it in airtable, not in the app.

1 Like

I think you can do this:
When user gets offline store data in tiny db and when user comes online store it in airtable

what exactly do you mean with: “in airtable”?

I know that this is convo is old but i think i can help .

Every 2 seconds make every user in your app store a value of +1 if connected to the internet
Other users can retrieve the data and if it keeps changing that gives them the online label

but if user is disconnected the value will remain the same so you can check that and give them the value offline

1 Like