Project: titanium
Issue TIMOB-19028: Windows: Geolocation module should instantiate Geolocator on-demand when in UI thread
Our current Windows Geolocation module generates a wrapped Geolocator in it's constructor. We should be generating it lazily on-demand, and hopefully in the UI thread according to the guidelines: https://msdn.microsoft.com/en-us/library/windows/apps/hh465148.aspx bq. On Windows only, the first use of the Geolocator object must be made on the main UI thread, to show a consent prompt to the user. The first use of the Geolocator can be either the first call to getGeopositionAsync or the first registration of a handler for the positionChanged event. The consent prompt is described further in Guidelines for using sensitive devices. This means that in an app using JavaScript, the first use of the Geolocator object should not occur in an activation handler.
Story points: 5