Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19028] Windows: Geolocation module should instantiate Geolocator on-demand when in UI thread

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2015-06-16T15:10:26.000+0000
Affected Version/sn/a
Fix Version/sRelease 4.1.0
ComponentsWindows
Labelsn/a
ReporterChristopher Williams
AssigneeKota Iguchi
Created2015-06-15T19:12:28.000+0000
Updated2017-03-16T21:53:20.000+0000

Description

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.

Comments

  1. Christopher Williams 2015-06-15

    As noted, this isn't an issue for phone apps, but for "store" apps.
  2. Kota Iguchi 2015-06-16

    https://github.com/appcelerator/titanium_mobile_windows/pull/288
  3. Lee Morris 2017-03-16

    Closing ticket as the issue has been fixed.

JSON Source