How to get obj key from FirebaseListAdapter on Item Click. FirebaseUI
The FirebaseListAdapter
assumes that you always know the index/position of the item you are interacting with. Given the Android context this makes sense, since collection views are index based.
Once you know the position, you can call adapter.getRef(position)
to get the Firebase reference to the object. On that reference, you can call getKey()
to get the key. Although I recommend only doing that as a last resort.