[
https://issues.apache.org/jira/browse/CB-9355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14624867#comment-14624867
]
ASF GitHub Bot commented on CB-9355:
------------------------------------
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);
}
> Fix Geolocation plugin start watch fail related to unset MovementThreshold on
> Windows 10
> ----------------------------------------------------------------------------------------
>
> Key: CB-9355
> URL: https://issues.apache.org/jira/browse/CB-9355
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin Geolocation
> Environment: Windows 10
> Reporter: Sergey Shakhnazarov
>
> Mobilespec, Cordova Geolocation Plugin ->Start Watching Location:
> {noformat}
> Exception calling native with command :: Geolocation :: addWatch ::exception=
> WinRTError: Operation aborted You must set the MovementThreshold property or
> the ReportInterval property before adding event handlers.
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]