Back

realtime

  • 0
  • Databases
  • Realtime
dammy
30 Aug, 2023, 19:46

I discovered that the stream of connection between database and client will always close when the internet mobile data is put off. How do I auto restart that, when the data is put on or make sure that the stream of connection is consistent

TL;DR
User is seeking help with maintaining a consistent stream of connection between their app and a database when internet connection is lost. Solution suggested is to use a network listener specific to the platform (Android or iOS). When the network changes, the user will need to implement code to automatically restart the connection. A package called "connectivity_plus" is recommended for managing network changes.
Drake
31 Aug, 2023, 02:09

You'll have to do that yourself by listening to network changes and then subscribing again

dammy
5 Sep, 2023, 07:29

okay, any hint?

darShan
5 Sep, 2023, 08:10

Depending on your platform, you'll have to use something like a network listener. For Android & iOS, there are already libraries out there on GitHub.

dammy
9 Sep, 2023, 06:08

Okay, though am using Flutter for my app

darShan
9 Sep, 2023, 06:09
dammy
9 Sep, 2023, 06:10

I appreciate you @darShan Thanks

dammy
9 Sep, 2023, 06:10

You're also a flutter dev?

darShan
9 Sep, 2023, 06:12

I've used Flutter for some projects and hackathons, but have been off from it for quite some time now.

dammy
9 Sep, 2023, 06:17

Ooo, I see

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more