I'm not sure if this is an Appwrite thing or a NextJS thing. I have a NextJS web app where I have realtime functionality working as I expected. However, on mobile devices, if the user turns their screen off and comes back after receiving a realtime event that should add another element on the page, that element doesn't show up. They would have to refresh the page for it to appear.
Yes, this is expected. You'll need to detect when the user is back in the app and reconnect.
What do you mean by reconnect? Like refresh the page?
Subscribe again
But that would only give me the new realtime events. The events that I missed when the screen was off won't be returned. No?
Correct
Is there a way to not miss any events? Or am I stuck with having to refresh the page so I get a fresh (complete) data?
You can run a background job to periodically fetch or fetch once the app is running again.
You have very limited options on mobile because the OS has a lot of restrictions
Hmmmm.. idk if I want to do that. I think I'll just refresh the page when the user comes back.
I haven't done mobile dev in so long but do you know if this issue is also present on mobile applications (native iOS and Android apps)?
Yes
Recommended threads
- Error can not create `tablesdb` event wi...
When i'm trying to add an event with `tablesdb` i get an error message My event value: `tablesdb.mtg-decklist-dev.tables.queue_parsing.rows.*.create` Same err...
- GitHub Student Login Loop Issue
signed up using my GitHub Student Developer Pack. However, whenever I click "Sign in with GitHub", I get stuck on the login page. No matter how many times I try...
- Google OAuth Not Working on Brave/Firefo...
I'm having an issue with Google OAuth in my React + Appwrite app. After login, the dashboard is accessible only in Microsoft Edge, but fails in Brave and Firefo...