On this page Query firestore database for document id
I found this javascript example to use documentId in where clause
db.collection('books').where(firebase.firestore.FieldPath.documentId(), '==', 'fK3ddutEpD2qQqRMXNW5').get()
what would be the Android equivalent to that? I tried using
whereEqualTo(firebase.firestore.FieldPath.documentId(), 'fK3ddutEpD2qQqRMXNW5');
but it didn't work
Edit: I don't want to use
db.collection('books').document("fK3ddutEpD2qQqRMXNW5").get()
because I want to learn how to use documentId
as field so that I can use that in other queries like
.orderBy(firebase.firestore.FieldPath.documentId())
(from Get data ordered by document Id in Firestore by Javascript?) in Android
In short, what is the equivalent of firebase.firestore.FieldPath.documentId()
in Android?