title: Why this ChildEventListener is not reading data from firebase node?
body: <p>I have a query to firebase node with ChildEventListener shown in image link 
  <a href="https://i.stack.imgur.com/1Yzwi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1Yzwi.png" alt="enter image description here"></a></p>
  
  <p>now when I run this code </p>
  
  <pre><code>mMessageRef.child(ScrollAppUtils.firebaseId).child(child.key).orderByKey().limitToLast(1).addChildEventListener(object : ChildEventListener {
  
      override fun onCancelled(p0: DatabaseError?) {}
  
      override fun onChildMoved(p0: DataSnapshot?, p1: String?) {}
  
      override fun onChildChanged(p0: DataSnapshot?, p1: String?) {}
  
      override fun onChildAdded(p0: DataSnapshot?, p1: String?) {
  
          Logger.d("inside onChild Added")
          if (p0!!.hasChildren())
          {
  
          var lastMessage = p0.getValue(MessagesTwo::class.java)
          var dialog = DefaultDialog(child.key, user.metaData.profileImage, user.metaData.name, arrayListUser, lastMessage, 2)
          if (!listDialog.contains(dialog)) {
  
              listDialog.add(dialog)
              Logger.d(listDialog.size)
              dialogListAdapter.setItems(listDialog)
              dialogListAdapter.notifyDataSetChanged()
          } else {
              Logger.d("inside updateItemByID : ")
              Logger.json(Gson().toJson(dialog))
              dialogListAdapter.updateItemById(dialog)
              dialogListAdapter.notifyDataSetChanged()
          }
          }
  
  
      }
  
      override fun onChildRemoved(p0: DataSnapshot?) {}
      })
  </code></pre>
  
  <p><strong>this listener simply doesn't work when a node not found</strong>,  which I believe should work as ValueEventListener is working very well but I have some other problem with that listener so I am compelled to use this listener. Please suggest me what is I am doing wrong here?  </p>