battery-saving logic for obtaining location