Android Question [Firestore lib] CollectionReference is not inited

peacemaker

Expert
Licensed User
Longtime User
Hi, @DonManfred

Lib is v.0.59. DB has the collection "users", but cannot get.

B4X:
Dim users As CollectionReference = fs.collection("users", "")
users.limit(10).fetch("UserFetch")
This is in your example, no error - but no records from db (exists 1).

B4X:
Dim users As CollectionReference = fs.collection2("users")
users.limit(10).fetch("UserFetch")

This does not work, seems not initialized, but users is not Null:
B4X:
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase(java.util.Locale)' on a null object reference
 
Last edited:

peacemaker

Expert
Licensed User
Longtime User
I seems to me that the trouble reason is not the rules. Some global setting of the db that has in your DB.
Also, my example code has no FirebaseNotifications, but it's also not the reason.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Some global setting of the db that has in your DB.
i am not aware of if so.

I only can say that it works for others using similar rules to mine.
 
Upvote 0
Top