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

QueryAtLocation not working after pressing back button. #15

Open
luislukas opened this issue Apr 18, 2020 · 4 comments
Open

QueryAtLocation not working after pressing back button. #15

luislukas opened this issue Apr 18, 2020 · 4 comments

Comments

@luislukas
Copy link

I've realised that after invoking:
Geofire.queryAtLocation(latitude, longitude, radius).listen((map) {} and getting successful results, if you press the back button and then launch the app again, the query won't return any result anymore, even though the @overrid void initState() is called again and the code having the Geofire query is executed.
The logs just display: queryAtLocation but then no result comes through. If we kill the app completely then all works fine again.
The only work around I found to have results after pressing the back button is to add Geofire.stopListener() after Geofire.onGeoQueryReady. Next time we launch the app it works fine, however, during that app session we won't be listening for any other event since we've stop them which is not ideal.
I've tried as well to do Geofire.stopListener() when the lifecycle is paused and initialised Geofire and do the search again when resume but doesn't work.
Is this something expected or I'm I doing something wrong?

@jesussmile
Copy link

I dong get any results with query. Is it still working for u ?

@luislukas
Copy link
Author

Yes, just checked and it still works for me.

@jesussmile
Copy link

Thanks got it to work, the problem is with the plugin, I had to move the project to another one with a clean install of the plugin. Same code but clean install got it to work.

@Instein125
Copy link

Thanks got it to work, the problem is with the plugin, I had to move the project to another one with a clean install of the plugin. Same code but clean install got it to work.

I have got the same problem with geofire 2.0.3 version. Which version should i downgrade? How to fix can you explain a bit

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

3 participants