0

`package com.google.firebase.firestore;

public interface ListenerRegistration { void remove(); }`

i've tried to search some resources but I haven't found it yet. so please help me

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807

1 Answers1

1

In the Realtime Database, if you need to remove the listener, you have to call Query#removeEventListener(@NonNull ValueEventListener listener) which:

Removes the specified listener from this location.

Besides that, if it's about Android, don't forget to remove the listener accordingly to the life-cycle of your activity.

Alex Mamo
  • 130,605
  • 17
  • 163
  • 193