[TIMOB-19021] Windows: Geolocation module always reporting location services disabled
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-06-25T12:53:00.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 4.1.0 |
Components | Windows |
Labels | n/a |
Reporter | Jörgen Buder |
Assignee | Kota Iguchi |
Created | 2015-06-15T15:10:59.000+0000 |
Updated | 2017-03-16T21:51:59.000+0000 |
Description
This looks to be a mismatch in our implementation with the way the property is defined.
We ask the current position status, but that value isn't "good" unless there's an active tracking session.
The property is meant to convey if the app itself is set up to do location services, so it's more a check if they've set the DeviceCapability in their package/appx.manifest.
I'm not sure if we can query capabilities at runtime or not. We might be able to do a simple call to the geolocator and catch exceptions to know if this property should be true or false.
Ti.API.info('GPS Enabled : ' + Ti.Geolocation.locationServicesEnabled);
//if (Ti.Geolocation.locationServicesEnabled) {
Ti.API.info('Setting accuracy...');
Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_HIGH;
Ti.API.info('Asking for current position...');
Ti.Geolocation.getCurrentPosition(function(e) {
Ti.API.info('Got current position!');
Ti.API.info('GPS Data : ' + JSON.stringify(e));
});
//}
https://github.com/appcelerator/titanium_mobile_windows/pull/323
Thanks... :)
Closing ticket as the issue has been fixed.