katescarth / literary-halifax-mobile-app

Literary Halifax Mobile App
GNU General Public License v3.0
0 stars 0 forks source link

App stalls if gps is disabled on start #7

Closed David-Owen-Walker closed 7 years ago

David-Owen-Walker commented 7 years ago

If you start the app with location services turned on, the 'getting location' spinner never disappears.

This issue derives from our hacky approach to getting permission to use location: We request location at launch, and wait for that to resolve before resolving any actual requests. If it doesn't resolve, this happens. The app is completely unusable except for the about page.

David-Owen-Walker commented 7 years ago

The root cause of our issue is that my computer doesn't like the cordova diagnostic plugin, which would be the go-to for dealing with permission issues like this. In short, the problem is that we request location permissions on an ad-hoc basis. Maybe the solution is to this is to only use the 'watchPosition' function, and use it only once. After that, we can use the location wherever we want, or fail as needed

David-Owen-Walker commented 7 years ago

I can't find the commit sha right now, but this is fixed