The flow in our app is the following:
- show a fullscreen activity explaining to the user why we need the GPS-location
- acquire the permission for GPS
- display loading spinner
- get first geolocation
- send first location to server
- load relevant data from server
- hide loading spinner
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
removeLocationUpdates
be executed asynchronously? – Applicator