The flow in our app is the following:
we've had multiple support requests from users saying that nothing happens and that they only see the loading spinner.
We're enforcing activated GPS-Providers at the moment, so it's not an issue of inactive locationservices.
I've managed to reproduce the bug by creating a user account on one of our phones and starting the app and I've noticed that onLocationChanged is not called
The code gets past LocationServices.FusedLocationApi.requestLocationUpdates
, so it should provide locations, but it doesn't
I know that I solved this issue in the past by opening google maps, but
a) I can hardly imagine that users did not use google maps so far b) telling them to open google maps to fix an issue in our app sounds weird
here is a gist of the exact code used (I set a breakpoint on line 131, started to debug and got there, so I should be getting locations, but the method onLocationChanged is never called
the "solution" if you want to call it that, was to tell users to open google maps, hit the "locate me" button, wait until google maps finds them and then open our app again and report back to us whether that did anything
edit:
even better, refactor the whole thing to not use a google-api-client at all, that would look something like this:
link (it's kotlin, whatever, kotlin is nice)
edit 2: I changed it from an eventbus implementation to an rx-subject instead. eventbuses are really dirty and if possible, you should stay away from them
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With