You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by elbarto132 <gi...@git.apache.org> on 2014/04/07 15:13:20 UTC

[GitHub] cordova-plugin-geolocation pull request: Update GPSListener.java

GitHub user elbarto132 opened a pull request:

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

    Update GPSListener.java

    Position was updated only every 60 Seconds. Changed it to notify every 5 meters.

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

    $ git pull https://github.com/elbarto132/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/15.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 #15
    
----
commit 176450197b033d0ef867bc096b5b07a93419076c
Author: elbarto132 <jo...@gmail.com>
Date:   2014-04-07T13:13:01Z

    Update GPSListener.java
    
    Position was updated only every 60 Seconds. Changed it to notify every 5 meters.

----


---
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.
---

[GitHub] cordova-plugin-geolocation pull request: Update GPSListener.java

Posted by kalebdf <gi...@git.apache.org>.
Github user kalebdf commented on the pull request:

    https://github.com/apache/cordova-plugin-geolocation/pull/15#issuecomment-44603398
  
    The Apple Developer Docs do offer a few [Tips for Battery Conservation](https://developer.apple.com/library/ios/documentation/userexperience/conceptual/LocationAwarenessPG/CoreLocation/CoreLocation.html#//apple_ref/doc/uid/TP40009497-CH2-SW17) while using the LocationManager. @Turnerj


---
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.
---

[GitHub] cordova-plugin-geolocation pull request: Update GPSListener.java

Posted by agrieve <gi...@git.apache.org>.
Github user agrieve commented on the pull request:

    https://github.com/apache/cordova-plugin-geolocation/pull/15#issuecomment-47383450
  
    Closing pull request since this file has been deleted. Plugin now just defers to browser's geolocation implementation.


---
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.
---

[GitHub] cordova-plugin-geolocation pull request: Update GPSListener.java

Posted by clelland <gi...@git.apache.org>.
Github user clelland commented on the pull request:

    https://github.com/apache/cordova-plugin-geolocation/pull/15#issuecomment-39731767
  
    Perhaps this kind of setting should be configurable? I don't see any compelling reason why distance-based update is objectively "better" than time-based. At the very least, I expect that it would consume more power by responding more frequently.
    
    (Unless I've misunderstood the purpose of this patch)


---
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.
---

[GitHub] cordova-plugin-geolocation pull request: Update GPSListener.java

Posted by ollide <gi...@git.apache.org>.
Github user ollide commented on the pull request:

    https://github.com/apache/cordova-plugin-geolocation/pull/15#issuecomment-39732624
  
    I agree that updating the position only every 60 seconds is bad, but so is 5 meters or any other hard coded value.
    
    Cordova is used in so many different applications that these parameters definitely need to be configurable!


---
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.
---

[GitHub] cordova-plugin-geolocation pull request: Update GPSListener.java

Posted by pgraham <gi...@git.apache.org>.
Github user pgraham commented on the pull request:

    https://github.com/apache/cordova-plugin-geolocation/pull/15#issuecomment-40219817
  
    Another thing to consider: as of Android 4.4 Settings > Location > Recent Location Requests will report apps as either "High Battery Use" or "Low Battery Use". Cordova's default of 1 minute causes a "High Battery Use" label. Changing the update interval to every 5 minutes reports as "Low Battery Use".
    
    Haven't tested how the labels are affected by different distance intervals.


---
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.
---

[GitHub] cordova-plugin-geolocation pull request: Update GPSListener.java

Posted by kalebdf <gi...@git.apache.org>.
Github user kalebdf commented on the pull request:

    https://github.com/apache/cordova-plugin-geolocation/pull/15#issuecomment-47444307
  
    Can you still listen for (`watchPosition`) the user's location even in the background when other apps are in focus? @agrieve 


---
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.
---

[GitHub] cordova-plugin-geolocation pull request: Update GPSListener.java

Posted by ollide <gi...@git.apache.org>.
Github user ollide commented on the pull request:

    https://github.com/apache/cordova-plugin-geolocation/pull/15#issuecomment-39741498
  
    "5 meters is fine for most use cases" is simply wrong. Yes, it might be an appropriate average value, but developers will still end up changing it to fit their needs.
    
    If the ``minTime`` and ``minDistance`` parameters change before they get configurable, I'd suggest ``0`` for both of them because it guarantees frequent location updates. Also these parameters are treated as a hint on Androids before JellyBean and are likely to be ignored. Using ``0`` will produce more similar results across different Android versions.
    
    Please note that using ``minDistance`` will not conserve battery life effectively. From the Android docs:
    > However it is more difficult for location providers to save power using the minDistance parameter, so minTime should be the primary tool to conserving battery life.
    
    Also note that the NetworkListener currently uses the same parameters as the GPSListener (60 seconds minTime).


---
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.
---

[GitHub] cordova-plugin-geolocation pull request: Update GPSListener.java

Posted by Turnerj <gi...@git.apache.org>.
Github user Turnerj commented on the pull request:

    https://github.com/apache/cordova-plugin-geolocation/pull/15#issuecomment-41006108
  
    I agree, this setting needs to be configurable. Possibly configurable allowing control of both `minDistance` and `minTime`. I haven't checked but do the other platforms (iOS etc) suffer from the same issues as the Android code does?


---
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.
---

[GitHub] cordova-plugin-geolocation pull request: Update GPSListener.java

Posted by elbarto132 <gi...@git.apache.org>.
Github user elbarto132 commented on the pull request:

    https://github.com/apache/cordova-plugin-geolocation/pull/15#issuecomment-39733427
  
    Making it configurable would of course be the best solution.
    But changing it to something like 5 meters is fine for most use cases.
    60 Seconds just doesn't make any sense, because it's not what you expect to get when you start a Geolocation Update Service and this does for sure confuse many people.


---
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.
---

[GitHub] cordova-plugin-geolocation pull request: Update GPSListener.java

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
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.
---