com.google.firebase.database.ChildEventListener |
Classes implementing this interface can be used to receive events about changes in the child
locations of a given DatabaseReference
ref. Attach the listener to a
location using addChildEventListener(ChildEventListener)
and the
appropriate method will be triggered when changes occur.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method will be triggered in the event that this listener either failed at the server, or
is removed as a result of the security and Firebase rules.
| |||||||||||
This method is triggered when a new child is added to the location to which this listener was
added.
| |||||||||||
This method is triggered when the data at a child location has changed.
| |||||||||||
This method is triggered when a child location's priority changes.
| |||||||||||
This method is triggered when a child is removed from the location to which this listener was
added.
|
This method will be triggered in the event that this listener either failed at the server, or is removed as a result of the security and Firebase rules. For more information on securing your data, see: Security Quickstart
Parameters | |
---|---|
error |
DatabaseError :
A description of the error that occurred
|
This method is triggered when a new child is added to the location to which this listener was added.
Parameters | |
---|---|
snapshot |
DataSnapshot :
An immutable snapshot of the data at the new child location |
previousChildName |
String :
The key name of sibling location ordered before the new child. This
will be null for the first child node of a location.
|
This method is triggered when the data at a child location has changed.
Parameters | |
---|---|
snapshot |
DataSnapshot :
An immutable snapshot of the data at the new data at the child location |
previousChildName |
String :
The key name of sibling location ordered before the child. This will
be null for the first child node of a location.
|
This method is triggered when a child location's priority changes. See setPriority(Object)
and Ordered Data for more information on priorities and ordering data.
Parameters | |
---|---|
snapshot |
DataSnapshot :
An immutable snapshot of the data at the location that moved. |
previousChildName |
String :
The key name of the sibling location ordered before the child
location. This will be null if this location is ordered first.
|
This method is triggered when a child is removed from the location to which this listener was added.
Parameters | |
---|---|
snapshot |
DataSnapshot :
An immutable snapshot of the data at the child that was removed.
|