android - How many levels does Firebase ChildEventListener listen to -


my current android application uses firebase store user data.

my data has following "structure" (and/or levels)

my-android-app.firebaseio.com/level0/level1/uuid1/uuid2 

data objects stored @ uuid2 resemble this

{    "students":[       {          "name":"amit goenka",          "major":"physics"       },       {          "name":"smita pallod",          "major":"chemistry"       },       {          "name":"rajeev sen",          "major":"mathematics"       }    ] } 

i need able detect when child data added, removed or changed etc below (at) uuid2, want set childeventlistener using path

android-app.firebaseio.com/level0/level1 

is possible?

during test far have had specify full path of:-

my-android-app.firebaseio.com/level0/level1/uuid1/uuid2 

firebase fire child_* event change under level register correct listener. fire child_added/child_removed nodes added/removed directly under level registered. other changes, fire child_changed , possibly child_moved.

your options:

  • flatten tree
  • listen value events
  • listen child_ events , figure out changes

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -