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
- Auth not working on expo react native
I'm trying to launch a development server with expo go and appwrite as a backend. On my windows pc, I've got a local docker instance of appwrite running as my b...
- Bulk delete failed with 401
- I created a transaction to bulk delete rows in a table has `done` equal `true` follow documentation. But when run, it returns 401 unauthorized error as screen...
- In which format should i pass the date?
I have a column with the type `datetime`. So i want to know which format is suitable for passing the date
