
TypeScript
Log.d("TAG", "loadData: here")
realtime.subscribe("databases.*.collections.*.documents.*") {
Log.d("TAG", "loadData: $it")
val data = it.payload.tryJsonCast(Data::class.java)
Log.d("TAG", "loadData: $data")
if (data != null) {
_list.value.add(message)
}
Log.d("TAG", "loadData: ${_list.value}")
}
Why only here
get print in my logcat?
It doesn't even through any error, nor any other data
TL;DR
Realtime subscription code is not functioning properly as expected. The subscription callback is only logging 'here' and not processing the data. Check if the subscription path is correct. Also, ensure that the Data class is correctly created and used for JSON parsing. Provide error handling and logging for better debugging.Recommended threads
- Query.equal error
Hi guys. I'm using Appwrite Cloud, and I'm using version 21 of node-appwrite to benefit from transactions. The problem is I seem to be getting an error when I u...
- Cannot access my Appwrite database on th...
Hello guys, I am currently developing a web app and using appwrite for authentication, database, storage and messaging. It was working well but since yesterday...
- How to create custom relatime channels
how do i create custome channels for real time communication. for example a room for a game with room code and sending messgaes to that roomcode and receiving m...
