Problem using dataChanged block in firebase



The firebase dataChanged will fired depend on your data changes.
If your data changes on one “child” level, then it will fired “once”.
BUT, if your data changes on the “root” level, then it will fired “as many as” your childrens.


I have seen this behaviour as well.

There might be some way to trick the system by playing with the bucket names.

Everything under the bucket is called. So change the bucket name to the child you are looking for.

Just a guess


Why is that?? What is the solution to that ??


first, you can trick the system with the bucket name in “tag” value (just as @Cian_O_Sullivan suggested) OR if not necessary, just don’t use the “DataChanged” block.


How to change bucket name into tag?? @Cian_O_Sullivan @mhartono


copy the bucket and paste it in a tag


okay then suppose if I have tag “meTag” then I should use tag “bucketname/meTag”, right??

Please give me some kind of example if possible.