Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use with 2 or more geofire event listeners in one app #25

Open
gbrain2001 opened this issue Jul 13, 2021 · 2 comments
Open

How to use with 2 or more geofire event listeners in one app #25

gbrain2001 opened this issue Jul 13, 2021 · 2 comments

Comments

@gbrain2001
Copy link

I am working on this geofire package and I have been trying to initialize a geofire, then stop that listener from one button. And then i have another button that initializes another geofire, then stop that listener. The problem is that it still reads the old locations and displays the markers on the map with those locations instead of the new ones. Could you explain to me the correct process how to stop a listener, delete the old markers and make them nullified before a new listener to display another set of markers on the map?

Thanks

@slender2332
Copy link

same issue here. the listener keeps use the old location . we need this issue to be solved!

@slender2332
Copy link

found the solutions ! add these lines in GeofirePlugin

@Override public void onCancel(Object o) { geoFire= null; geoQuery.removeAllListeners(); geoQuery = null; events = null; databaseReference = null; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants