locationChanged | |||||||||||||
Type | message | ||||||||||||
Dictionary | LCS | ||||||||||||
Library | LiveCode Script | ||||||||||||
Syntax |
| ||||||||||||
Summary | Sent to the current card of the default stack when the location of the device changes. | ||||||||||||
Introduced | 4.5.2 | ||||||||||||
Changes | In version 8.1 GPS behavior on iOS was changed to bring it inline with the behavior on Android. On both platforms, the location reading returned by the mobileSensorReading function is that which was sent with the last system locationChanged event. | ||||||||||||
OS | ios, android | ||||||||||||
Platforms | mobile | ||||||||||||
Parameters |
| ||||||||||||
Example |
| ||||||||||||
Related | Command: mobileSetLocationHistoryLimit, mobileStopTrackingSensor, mobileStartTrackingSensor Function: mobileGetLocationHistoryLimit, mobileSensorAvailable, mobileSensorReading, mobileLocationAuthorizationStatus Message: locationChanged, trackingError | ||||||||||||
Description | Handle the locationChanged message if you want to perform tasks when the location of the device changes. The locationChanged message is sent to the current card of the default stack when the location of the device changes. If location tracking cannot be started (typically due to the user 'not allowing' access to CoreLocation) then a trackingError message is sent instead. |