APP SDK Event Codes

From Engineering Client Portal

Engineering Portal / Digital / DCR & DTVR / APP SDK Event Codes

Event and Error Handling

iOS Event & Error Codes

An enumeration with predefined App SDK event state transition codes.

typedef NS_ENUM(unsigned int, AppApiEventCode)
{
     AppApiStartup = 2001,
     AppApiShutdown = 2002,
}AppApiEventCode;

App SDK Event Codes

Event Code Event Name Event Description
2001 AppApiStartup App SDK has initialized successfully. It will happen only after App SDK has received a valid config file
2002 AppApiShutdown App SDK is shutting down. It will happen just before App SDK is destroyed

AppApiErrorCode

iOS contains two types of error codes, 1-15 and 1001-1009.

For, 1-15, an enumeration with predefined error codes which the App SDK object can generate.

typedef NS_ENUM(unsigned int, LogCode) {
    LogCodeFailedParseStartInfo, // 1.
    LogCodeFailedParseMetadata, // 2.
    LogCodeFailedProcessID3, // 3.
    LogCodeFailedReceiveConfig, // 4.
    LogCodeFailedParseConfig, // 5.
    LogCodeFailedStartProcessor, // 6.
    LogCodeFailedCreateUrl, // 7.
    LogCodeFailedCreateRequest, // 8.
    LogCodeFailedSendHttpRequest, // 9.
    LogCodeFailedSendPing, // 10.
    LogCodeFailedSendTSV, // 11.
    LogCodeFailedSendStationRequest, // 12.
    LogCodeFailedAccessDatabase, // 13.
    LogCodeException, // 14.
    LogCodeInvalidPlayheadPosition, // 15.
};


For, 1001-1009, an enumeration with predefined error codes which the App SDK object can generate.

typedef NS_ENUM(unsigned int, AppApiErrorCode)
{
   AppApiNetworkConnectionFailure = 1001,
   AppApiFileWriteFailure = 1002,
   AppApiFileReadFailure = 1003,
   AppApiEmptyValue = 1004,
   AppApiEmptyAppName = 1005,
   AppApiEmptyAppVersion = 1006,
   AppApiEmptyAppId = 1007,
   AppApiAnExceptionOccured = 1008,
   AppApiUnknownExceptionOccured = 1009
};

Android App SDK Error Codes

Error Code Error Name Error Description
1 LogCodeFailedParseStartInfo Failed to parse the play() JSON string
2 LogCodeFailedParseMetadata Failed to parse the loadMetadata() JSON string
3 LogCodeFailedProcessID3 Failed to process ID3 data on a data processor
4 LogCodeFailedReceiveConfig Failed to receive configuration file from Census
5 LogCodeFailedParseConfig Failed to parse the config file JSON string
6 LogCodeFailedStartProcessor Failed to create SDK processor
7 LogCodeFailedCreateUrl Failed to generate URL due to missing mandatory parameter
8 LogCodeFailedCreateRequest Failed to create request in HTTP client
9 LogCodeFailedSendHttpRequest Failed sending HTTP or HTTPS request
10 LogCodeFailedSendPing Failed to send ping
11 LogCodeFailedSendTSV Failed to send TSV request
12 LogCodeFailedSendStationRequest Failed to send StationId request
13 LogCodeFailedAccessDatabase Failed to read/write from/to database table
14 LogCodeException Any exception handled by SDK code
15 LogCodeInvalidPlayheadPosition Invalid playhead position
Error Code Error Name Error Description
1001 AppApiNetworkConnectionFailure App SDK Could not connect to server
1002 AppApiFileWriteFailure App SDK Could not write to file
1003 AppApiFileReadFailure App SDK Could not read data from file
1004 AppApiEmptyValue Empty value Found.
1005 AppApiEmptyAppName Cannot initialize SDK Object without an AppName(Player Name)
1006 AppApiEmptyAppVersion Cannot initialize API Object without an AppVersion
1007 AppApiEmptyAppId Cannot initialize API Object without an AppId
1008 AppApiAnExceptionOccured Exception occurred
1009 AppApiUnknownExceptionOccured Unknown exception occurred

App SDK Event Codes

Event Code Event Name Event Description
2000 EVENT_INITIATE App SDK is initiated. It will happen as soon as the App SDK is initialized
2001 EVENT_STARTUP App SDK has started up. It will happen only after App SDK has received a valid config file. This is the location in the code to acquire the value of userOptOutURLString().
2002 EVENT_SHUTDOWN App SDK is shutting down. It will happen just before App SDK is destroyed

App SDK Error Codes

Constants with predefined error codes which the AppSdk object can generate.

Error Code Error Name Description Behavior
1001 ERROR_FAILED_CREATE_URL_STRING Failed generating ping string due to error on parsing Include last error message from URL parser
1002 ERROR_FAILED_RECEIVE_CONFIG Failed to receive configuration file from Census On 5th time, it will log event and keep requesting config 10 min apart
1003 ERROR_FAILED_PARSING_CONFIG Failed parsing the config file JSON string Include json error number/short message from iOS or Android
1004 ERROR_FAILED_PARSING_PLAY Failed parsing the play() JSON string Include JSON error number/short message from iOS or Android
1005 ERROR_FAILED_PARSING_METADATA Failed parsing the play() JSON string Include JSON error number/short message from iOS or Android
1006 ERROR_FAILED_GENERATING_PING Failed creating ping before adding it to the UPLOAD table) Include ping nol_url index, cadence to identify ping
1007 ERROR_FAILED_PROCESSOR_START Failed starting data processor thread. Normally, that means a product Include processor that failed to start
1008 ERROR_FAILED_PROCESS_ID3 Failed processing data on a data processor. Normally, that means the input to a product Include processor and data that failed to process (ID3 tag on a MTVR impression, for example)
1009 ERROR_FAILED_HTTP_SEND Failed sending HTTP or HTTPS requests Include HTTP error number
1010 ERROR_FAILED_SENDING_PING Failed sending pings (on ANDROID, the ping on the UPLOAD table) Include ping up to 80 char from the end
1011 ERROR_FAILED_SENDING_TSV Failed sending TSV requests Include TSV request message
1012 ERROR_FAILED_SENDING_STATION_ID Failed sending Station ID requests Include Station ID request message
1013 ERROR_FAILED_ACCESSING_DB Failed read/write from/to database table Include SQL statement and data and SQLite error number/message
1014 ERROR_CHANGED_DEVICE_ID Device ID changed
1015 ERROR_CHANGED_NUID NUID changed
1016 ERROR_SDK_NOT_INITIALIZED App SDK initialization failed
1017 ERROR_FAILED_SDK_SUSPEND App SDK failed to suspend activities
1018 ERROR_INVALID_PARAMETERS App SDK invalid parameters
1019 ERROR_INVALID_STATE App SDK called in incorrect state
1020 ERROR_FAILED_PROCESS_PLAYHEAD App SDK failed processing playhead position
1021 ERROR_FAILED_PROCESS_METADATA App SDK failed processing not-null, syntax valid JSON metadada
1022 ERROR_FAILED_PROCESS_STOP App SDK failed processing stop