Rank 1: Thread
I try to put document id in an field of document in android sdk
Votes
0
Replies
21
Participants
Unknown
Messages
22
Rank 1: Thread
I try to put document id in an field of document in android sdk
Hey could you please explain the issue, I don't think I understood
Rank 7: Quantum Computer
If you mean generate a unique id you can use this
ID.unique(),
For more details look here
https://appwrite.io/docs/getting-started-for-android#makeRequest
Rank 1: Thread
If I use ID.unique() the result is String = "unique()"
Rank 1: Thread
And I need something like this 64095923cf64fe976024
Rank 1: Thread
Isn't a issue I need to put in a id filed the same documentId value
Admin
This is the expected behavior. When unique() is processed by the server, it's converted to a unique id like 64095923cf64fe976024
Rank 1: Thread
ok but is converted in the same unique code, because I need it to be the same code (documentID with my id field)
Do I understand correctly you need attribute on a document which holds the same value as the document ID?
Why do you need that? When reading documents, you can access document if under .$id.
Rank 1: Thread
yes
Rank 1: Thread
i resolved this with UUID it's ok
Rank 1: Thread
It's possible to put query on realtime?
There are multiple channels you can subscribe to regarding realtime: https://appwrite.io/docs/realtime#channels
Querying isn't really possible, but you can simply subscribe to all document changes. Then, when payload arrives, you can use if statements to filter out those you don't want.
No need to be worried about performance/network too much, as you only get realtime updates about documents you have read permissions to.
Alternativelly, you could do listDocuments query to get IDs of documents you are looking for. Then, subscribe to only those documents. Might be viable depending on your use case
Rank 1: Thread
and realtime is called for each colletion update?
Depending on what you listen to. You can listen to collection changes, collection creation, document changes, functions, executions.. There is a lot you can subscribe to
Rank 1: Thread
And if I want to listener all documents it's ok "databases.${db_id}.collections.${ads_id}.documents.*?
Rank 1: Thread
I don't receive documents
Rank 1: Thread
And if I want to listener all documents it's ok "databases.${db_id}.collections.${ads_id}.documents.*?
You need to use those channels
Rank 1: Thread
Thx
Admin
[SOLVED] How to generate id like admin dashboard in android sdk