Skip to content

Instantly share code, notes, and snippets.

@skydoves
Created September 9, 2024 03:08
Show Gist options
  • Save skydoves/ec7b9d0f8454483ba3dedb712b0be7de to your computer and use it in GitHub Desktop.
Save skydoves/ec7b9d0f8454483ba3dedb712b0be7de to your computer and use it in GitHub Desktop.
firebase_rt_db_java
val listener = object : ValueEventListener {
override fun onDataChange(snapshot: DataSnapshot) {
val value = snapshot.child("timeline")
// ..
}
override fun onCancelled(error: DatabaseError) {
// ..
}
}
database.addValueEventListener(listener)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment