Project: titanium
Issue TIMOB-23389: Windows: Ti.Geolocation does not prompt location permission
[~htbryant] reported there's no prompt to ask for location permission on Windows 10 Mobile. {code} var win = Ti.UI.createWindow({ backgroundColor: 'green' }); var label = Ti.UI.createLabel({ color: "blue", text: "Get Current Position" }); win.add(label); label.addEventListener('click', function () { if (Ti.Geolocation.locationServicesAuthorization == Ti.Geolocation.AUTHORIZATION_DENIED) { Ti.API.info('Location request has been denied'); return; } else { Ti.API.info('Location request has been granted'); } Ti.Geolocation.getCurrentPosition(function (e) { Ti.API.info(JSON.stringify(e.coords)); }); }); Ti.Geolocation.addEventListener("location", function (e) { Ti.API.info(JSON.stringify(e.coords)); }); win.addEventListener('open', function () { Ti.API.info('Ti.Geolocation.locationServicesEnabled: ' + Ti.Geolocation.locationServicesEnabled); }); win.open(); {code}
Story points: 5