Back

Realtime does not work sometimes

  • 0
  • Flutter
  • Realtime
  • Cloud
Zionnite
29 Apr, 2024, 18:25

hello, in my code, Realtime functions does not work, other times it will work, i first thought it was due to unstable internet connection, so i created a question and i was told to use connective_plus package to use to detect the connection of the network then subscribe again, which i did and it work.

but now, the realtime will not even work, sometimes it will, the pattern is not consistent

here is my code below

TL;DR
Realtime function works inconsistently despite efforts to stabilize internet connection. It was suggested to use the connective_plus package to detect network status and resubscribe, but the issue persists.
Zionnite
29 Apr, 2024, 18:25
TypeScript
  final liveStreamApi = ref.watch(liveStreamApiProvider);
  return liveStreamApi.getLatestLiveStreamers(myUserId: userId);
});




@override
  Stream<RealtimeMessage> getLatestLiveStreamers({required String myUserId}) {
    return _realTime.subscribe(['databases.${Common.dataBasesId}.collections.${Common.collectionLiveStreamingId}.documents']).stream;
  }```
Zionnite
29 Apr, 2024, 18:27

here is how i listen to it

Zionnite
29 Apr, 2024, 18:31
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