This article explains the current behavior of the mobile app when punch with location is active for the client. 


This ticket involved fleshing out some of the error messages that get displayed when the user's location is unable to be determined (for a variety of reasons). 


If a user has location permissions disabled (iOS) it prints:

Turn on Location Services to allow Timerack to determine your location, then retry your punch.


And present the user two options: "Go To Settings" or "Don't Use Location." If the user clicks "Don't Use Location" then a second pop-up window will be displayed saying Could not get your location due to location permission settings. Punching is not allowed. with an "Ok" button.



If a user has location permissions disabled (Android) it prints:

Turn on Fine Location Services to allow Timerack to determine your location, then retry your punch. with two option buttons: "Go To Settings" or "Do Not Use Fine Location." If the user selects "Do Not Use Fine Location" then we display a second pop-up with Could not get your location due to fine location permission settings. Punching is not allowed.

and an "Ok" button.


(note that an Android user can have approximate location services on but not fine location services). There is currently no way to determine if a user has "fine" turned off but "approximate" turned on, so we can't print a specific message for that case. However, if they don't have "fine" location on, the app will prompt them to turn it on once the next time it goes to fetch their location. If "fine" location is rejected again, it will not prompt again (this is due to Android's two-prompt limit for permissions).



If the location can't be fetched due to poor network connection or a timeout, we display Could not retrieve your location. Punch will not be sent. Please check device's network connection and try again. with an "Ok" button.


If the location can't be fetched due to a larger error (like Google Services being temporarily down), we display Could not retrieve your location. Punch will not be sent. Please check device's network connection and try again. again but this will be logged to Bugsnag. It should still be a transitive error so we prompt the user to keep retrying. 


Internal errors can also sometimes be thrown from the location-fetching package we use, so if that happens we display An error occurred while retrieving your location. Punch will not be sent. Please try again. with an "Ok" button.