cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markwpearce <...@git.apache.org>
Subject [GitHub] cordova-plugin-geolocation pull request: iOS: Clearing all Watches...
Date Mon, 15 Sep 2014 19:47:32 GMT
GitHub user markwpearce opened a pull request:

    https://github.com/apache/cordova-plugin-geolocation/pull/25

    iOS: Clearing all Watches stops Location Services

    iOS shows a little arrow in the status bar if location services are in use. When you set
a watch on Location Manager, it starts tracking position, and the arrow symbol appears. However,
when that watch is cleared, no command to Location Manager is sent to stop tracking, so the
arrow stays visible, even though in reality, the app is not using location services. My guess
is that this also impacts battery life to some extent, especially if your iOS app has background
location enabled.
    
    This fix would automatically stop tracking location once all watched are cleared, so that
the arrow symbol in the iOS status will disappear.
    
    Tested on iOS 7.1.2.
    
    (Note: I don't really want to go through the rigamarole of signing up to be a contributor,
so if someone else wants to take credit for this, go ahead)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/markwpearce/cordova-plugin-geolocation patch-1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-geolocation/pull/25.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #25
    
----
commit 974c9199891b6d2c07b6abc18591a6b733cc05fa
Author: Mark Pearce <markwpearce@gmail.com>
Date:   2014-09-15T19:43:08Z

    iOS: Clearing all Watches stops Location Services 
    
    iOS shows a little arrow in the status bar if location services are in use. When you set
a watch on Location Manager, it starts tracking position, and the arrow symbol appears. However,
when that watch is cleared, no command to Location Manager is sent to stop tracking, so the
arrow stays visible, even though in reality, the app is not using location services. My guess
is that this also impacts battery life to some extent, especially if your iOS app has background
location enabled.
    
    This fix would automatically stop tracking location once all watched are cleared, so that
the arrow symbol in the iOS status will disappear.
    
    Tested on iOS 7.1.2.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message