Hi.
In my Firebase Database I have the structure shown in the picture, and want to know if a nickname is available or is already in use.
After several attempts I think I'm close to the solution with:
and then work with the snapshot in "GetNick_onDataChange", but doesn't work.
I've tried also with:
and
...but no luck. Any ideas?
Thank you
In my Firebase Database I have the structure shown in the picture, and want to know if a nickname is available or is already in use.
After several attempts I think I'm close to the solution with:
B4X:
Dim refNick as DatabaseReference
refNick.Initialize("refNick", realtime.getReference2("/"), "Verify nickname")
refNick.orderBykey.equalTo(nickToVerify).setEventname("GetNick", "GetNick").addChildEventListener.addValueEventListener
and then work with the snapshot in "GetNick_onDataChange", but doesn't work.
I've tried also with:
B4X:
refNick.orderByChild("Nickname").equalTo(nickToVerify).setEventname("GetNick", "GetNick").addChildEventListener.addValueEventListener
and
B4X:
refNick.LimitToFirst(1).orderByChild("Nickname").equalTo(nickToVerify).setEventname("GetNick", "GetNick").addChildEventListener.addValueEventListener
...but no luck. Any ideas?
Thank you