The Location Recorder API defines a flexible solution for geolocation track recording. You
can create multiple independent Recorder
objects, configure them differently and manage their life-cycle independently. Changes made in
one object are propagated asynchronously to the other objects with the same identifier. Do not
use this API unless you need to restore a reference to a running tracker after an application
has crashed or a page has been reloaded.
To make sure that there is only one instance of the recorder object with a given identifier within a WebView, there is no constructor for the object.
Location data is sent to the Pega Platform by using the data synchronization mechanism.
Name | Description | Type |
---|---|---|
Configuration | The Configuration object with five enumerable properties that defines the
Recorder object's behavior. |
object |
Status | The Status enum that defines four available states of the Recorder
object. |
object |
The following table lists the error codes predefined for a Recorder
instance.
Constant | Description |
---|---|
window.launchbox.PRPC.LocationRecorder.IllegalOperationError | The requested operation cannot be performed. |
window.launchbox.PRPC.LocationRecorder.LocationClientStoreClosedError | It was impossible to synchronize data using the PRPC Client Store API. |
window.launchbox.PRPC.LocationRecorder.LocationNotAvailableError | The device was unable to retrieve the position information. It usually means that the device has no network connectivity and/or cannot get a satellite fix. |
window.launchbox.PRPC.LocationRecorder.LocationServicesPermissionError | The user does not allow the application to retrieve the position information. |
Name | Return type | Description |
---|---|---|
recorder | promise |
Creates a new |
availableRecorders | promise |
Retrieves a map of existing recorder instances. |