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

[GitHub] cordova-plugin-geolocation pull request: CB-9355 Fix Geolocation p...

GitHub user daserge opened a pull request:

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

    CB-9355 Fix Geolocation plugin start watch fail related to unset Move…

    …mentThreshold on Windows 10
    
    [Jira issue](https://issues.apache.org/jira/browse/CB-9355)

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

    $ git pull https://github.com/MSOpenTech/cordova-plugin-geolocation CB-9355

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

    https://github.com/apache/cordova-plugin-geolocation/pull/45.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 #45
    
----
commit 7aae351976ed9b921dc07ad9b41ce9eb43fcda91
Author: daserge <da...@yandex.ru>
Date:   2015-07-13T13:30:54Z

    CB-9355 Fix Geolocation plugin start watch fail related to unset MovementThreshold on Windows 10

----


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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-geolocation pull request: CB-9355 Fix Geolocation p...

Posted by robpaveza <gi...@git.apache.org>.
Github user robpaveza commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-geolocation/pull/45#discussion_r34478957
  
    --- Diff: src/windows/GeolocationProxy.js ---
    @@ -16,7 +16,8 @@
     
     var PositionError = require('./PositionError'),
         ids = {},
    -    loc;
    +    loc,
    +    isWin10 = navigator.appVersion.indexOf('MSAppHost/3.0') !== -1;
    --- End diff --
    
    This won't scale post Win10.  Is the API new in Windows Phone 8.1?


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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-geolocation pull request: CB-9355 Fix Geolocation p...

Posted by robpaveza <gi...@git.apache.org>.
Github user robpaveza commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-geolocation/pull/45#discussion_r34479855
  
    --- Diff: src/windows/GeolocationProxy.js ---
    @@ -16,7 +16,8 @@
     
    --- End diff --
    
    In ensureLocator you should also call requestAccessAsync:
    
    "Starting in Windows 10 Insider Preview, call the RequestAccessAsync before accessing the user’s location. At that time, your app must be in the foreground and RequestAccessAsync must be called from the UI thread. Until the user grants your app permission to their location, your app can't access location data."
    
        var locator = new Windows.Devices.Geolocation.Geolocator();
        var loc;
        if (typeof Windows.Devices.Geolocation.Geolocator.prototype.requestAccessAsync === 'function')) {
            loc = locator.requestAccessAsync().then(function(result) { if (result) return locator; });
        } else { 
            loc = WinJS.Promise.wrap(locator);
        }



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-geolocation pull request: CB-9355 Fix Geolocation p...

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

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


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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-geolocation pull request: CB-9355 Fix Geolocation p...

Posted by robpaveza <gi...@git.apache.org>.
Github user robpaveza commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-geolocation/pull/45#discussion_r34479900
  
    --- Diff: src/windows/GeolocationProxy.js ---
    @@ -142,8 +143,8 @@ module.exports = {
                     Windows.Devices.Geolocation.PositionAccuracy.high :
                     Windows.Devices.Geolocation.PositionAccuracy.default;
     
    -        if (cordova.platformId == 'windows' && WinJS.Utilities.isPhone) {
    -            // on Windows Phone 8.1 'positionchanged' event fails with error below if movementThreshold is not set
    +        if (cordova.platformId == 'windows' && (WinJS.Utilities.isPhone || isWin10)) {
    +            // on Windows Phone 8.1 and Windows 10 'positionchanged' event fails with error below if movementThreshold is not set
    --- End diff --
    
    We should just always set the movementThreshold property.  It exists for Windows 8 according to the documentation.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org