I have the following code for an Angular factory that enables and disables geolocation when the app is opened and paused: MyApp.factory('geolocation', function () { var _clearWatch = function () { navigator.geolocation.clearWatch(_watch); }; // More functions omitted for bre...