Class adobeDPS-FolioActivityService
- Extends:
- adobeDPS-FolioActivityService -> adobeDPS-Service -> adobeDPS-Class
- Platforms:
- iOS, Windows
This class defines the service to monitor folio activity events.
Accessible from adobeDPS.folioActivityService
Constructor
Static Fields
| Field | Defined By | |
|---|---|---|
|
adobeDPS-FolioActivityService.instance
The singleton of the FolioActivityService.
|
FolioActivityService
|
Fields
| Field | Defined By | |
|---|---|---|
|
supportedEventNames
: Array
The supported event names.
|
FolioActivityService
|
|
|
supportedEventAttributes
: Array
The supported event attributes.
|
FolioActivityService
|
|
|
currentRecordingId
: String
The current recording identfier.
|
FolioActivityService
|
|
|
recordings
: Array
The array of active recordings in the form of adobeDPS-FolioActivityRecording
objects.
|
FolioActivityService
|
|
|
stateChangedSignal
: Signal
The signal used to indicate that the recording service state has changed.
|
FolioActivityService
|
|
|
FolioActivityRecordingStates
: Object
The supported recording states as an enum object.
|
FolioActivityService
|
|
|
FolioActivityErrorCodes
: Object
The supported error codes as an enum object.
|
FolioActivityService
|
Methods
| Method | Defined By | |
|---|---|---|
|
startRecording(recordingId:String, config:FolioActivityConfig, successCB:Function, errorCB:Function)
Initiates recording of user-generated folio events.
|
FolioActivityService
|
|
|
stopRecording(successCB:Function, errorCB:Function)
Function used to stop folio events recording for the current recording identifier.
|
FolioActivityService
|
|
|
getEvents(recordingId:String, successCB:Function, errorCB:Function)
Function used to retrieve the recorded events from the persistent storage for a given recording
identifier.
|
FolioActivityService
|
|
|
deleteEvents(recordingId:String, successCB:Function, errorCB:Function)
Releases all activity history associated with the specified recording identifier from the
persistent store.
|
FolioActivityService
|
|
|
resetService(successCB:Function, errorCB:Function)
Resets the state of FolioActivityService to initial conditions.
|
FolioActivityService
|
|
|
toString()
Gets the string representation of this instance.
|
This is an internal constructor and shouldn't be called by regular users.
- Platforms:
- iOS, Windows
The supported event names are:
- Issue Download Started
- Issue Download Completed
- Issue Download Terminal Error
- Issue Download Cancelled
- Content View
- Content Browse
- AD View
- Edit view
- Overlay Started
- Overlay Stopped
- URL clicks
- Social Content Share
- End of article reached
- Custom Event 1
- Custom Event 2
- Custom Event 3
- Custom Event 4
- Custom Event 5
- Custom Event 6
- Custom Event 7
- Custom Event 8
- Custom Event 9
- Custom Event 10
The supported event attributes are:
- eventName
- eventTime
- appVersion
- publicationId
- issueId
- stackId
- screenId
- contentTitle
- overlayId
- overlayType
- networkStatus
- deviceOrientation
- issueName
- adStackTitle
- contentType
- articleStackTitle
- entitlementCategory
- downloadError
- downloadState
- sharingMode
- appStore
- pushToken
- viewerVersion
- url
- urlDestination
- viewerType
- findMethod
- subscriberId
- subscriberType
- startupSource
- engagementType
- pushNotificationId
- customVariable1
- customVariable2
- customVariable3
- customVariable4
- customVariable5
- customVariable6
- customVariable7
- customVariable8
- customVariable9
- customVariable10
This can be as a result of calling startRecording(), stopRecording(), deleteEvents(), and any errors they generate. An application may register a handler for this signal in order to track the state of the recording.
If an event filter is not supplied in the config parameter or the events filter is an empty array, then all events are recorded; otherwise, only the event names in the filter are recorded.
Only one active recording is permitted. If startRecording() is called while a recording is in progress an error will be returned to the error handler with the code FolioActivityErrorCodes.RECORDING_ALREADY_STARTED.
The recordingId must be a valid non-empty JavaScript string of no more than 64 printable characters. The special characters \' \" \\ \n \r \t \b \f are not allowed in the recording identifier.
| Parameters | ||
|---|---|---|
| recordingId | String | The recording identifier under which the events are stored. |
| config | FolioActivityConfig | The recording configuration. See adobeDPS-FolioActivityConfig |
| successCB | Function |
The callback function that handles the success of the
request. Callback Signature: successCB() |
| errorCB | Function |
The callback function that handles the error when request
fails. Callback Signature: errorCB({recordingId: String, error: Object}) |
- Throws:
- Error If the errorCB is invalid
- Platforms:
- iOS, Windows
| Parameters | ||
|---|---|---|
| successCB | Function |
The callback function that handles the success of the
request. Callback Signature: successCB() |
| errorCB | Function |
The callback function that handles the error when request
fails. Callback Signature: errorCB({recordingId: String, error: Object}) |
- Throws:
- Error If the errorCB is invalid
- Platforms:
- iOS, Windows
This does not delete the events from the storage. In order to delete them from the storage deleteEvents() must be called.
The recordingId must be a valid non-empty JavaScript string of no more than 64 characters; otherwise an error is generated. The special characters \' \" \\ \n \r \t \b \f are not allowed in the recording identifier.
| Parameters | ||
|---|---|---|
| recordingId | String | The recording identifier the events are requested for. |
| successCB | Function |
The callback function that handles the success of the
request. Callback Signature: successCB({recordingId: String, events: Array of {attribute: value}) where attribute takes values from the supportedEventAttributes array. The eventName and eventTime attributes are mandatory and will be always present; the eventTime attribute is represented as a string in ISO-8601 format with a 0 time zone offset (UTC). The value takes string values specific to the attribute. The values for eventName attribute are from the supportedEventNames array. |
| errorCB | Function |
The callback function that handles the error when request
fails. Callback Signature: errorCB({recordingId: String, error: Object}) |
- Throws:
- Error If the errorCB is invalid
- Platforms:
- iOS, Windows
| Parameters | ||
|---|---|---|
| recordingId | String | The recording identifier the events are requested for. |
| successCB | Function |
The callback function that handles the success of the
request. Callback Signature: successCB(recordingId) |
| errorCB | Function |
The callback function that handles the error if the request
fails. Callback Signature: errorCB({recordingId: String, error: Object}) |
- Throws:
- Error If the errorCB is invalid
- Platforms:
- iOS, Windows
Calling this method should not normally be needed, but it may be useful during application development, or if storage I/O errors or other external problems affect the stability or integrity of the persistent storage.
| Parameters | ||
|---|---|---|
| successCB | Function |
The callback function that handles the success of the
request.
Callback Signature: successCB() |
| errorCB | Function |
The callback function that handles the error if the request
fails. Callback Signature: errorCB({recordingId: String, error: Object}) |
- Throws:
- Error If the errorCB is invalid
- Platforms:
- iOS, Windows
Documentation generated by JsDoc Toolkit 2.4.0 on Mon Aug 31 2015 09:23:26 GMT-0700 (PDT)