Dealing with Android Mobile SDK Errors

You need to listen for error notifications on the player object.

First declare the following:

public static final String ERROR_NOTIFICATION = "error" ;  
    /** Fires when an error occurs */
    

After an error notification is received, to determine the exact error, read the error property of the player object:

/** Returns current error if it exists */
public String getError() {
    return _error;
}  

Mobile SDK for Android Error Codes

Error Code Description
ERROR_AUTHORIZATION_FAILED 0 The authorization request failed.
ERROR_AUTHORIZATION_INVALID 1 The authorization request returned an invalid response.
ERROR_AUTHORIZATION_HEARTBEAT_FAILED 2 The heartbeat confirmation failed. The Ooyala heartbeat request is required for some services, such as concurrent stream limits.
ERROR_CONTENT_TREE_INVALID 3 The request to retrieve information about the content (closed captions, thumbnails, other metadata for the video) returned an unexpected response.
ERROR_AUTHORIZATION_SIGNATURE_INVALID 4 The signature passed in the Authorization request was invalid.
ERROR_CONTENT_TREE_NEXT_FAILED 5 The request to retrieve information about the content (closed captions, thumbnails, other metadata for the video) returned an unexpected response.
ERROR_PLAYBACK_FAILED 6 Attempts to play the stream failed.
ERROR_ASSET_NOT_ENCODED 7 The stream is not properly encoded for the device.
ERROR_INTERNAL_ANDROID 8 The current item is not encoded for Android.
ERROR_METADATA_FETCH_FAILED 9 The request for metadata related to the video returned an invalid response.
ERROR_DEVICE_INVALID_AUTH_TOKEN 10 The authorization token is not valid.
ERROR_DEVICE_LIMIT_REACHED 11 An error occurred during DRM Rights acquisition. Indicates a server report that the device limit has been reached for the user. A device will need to be unbound by either the end-user or the customer for the end-users unique ID.
ERROR_DEVICE_BINDING_FAILED 12 The API that binds a device to the user ID failed. This could happen for a number of reasons (e.g. no unique ID provided with the API request, some internal API failure, etc.).
ERROR_DEVICE_ID_TOO_LONG 13 An error occurred during DRM Rights Acquisition. Indicates a server report that the device id has too many characters (overflows in the database).
ERROR_DRM_GENERAL_FAILURE 14 A general failure occurred relating to DRM.
ERROR_DRM_FILE_DOWNLOAD_FAILED 15 The attempt to download the stream for offline playback failed to complete.
ERROR_DRM_PERSONALIZATION_FAILED 16 An error occurred during DRM Rights acquisition. Indicates that device personalization failed to complete.
ERROR_DRM_RIGHTS_SERVER_ERROR 17 The DRM Rights Server returned an error.
ERROR_DISCOVERY_INVALID_PARAMETER 18 The Discovery API request was sent with invalid parameters.
ERROR_DISCOVERY_NETWORK_ERROR 19 The Discovery request failed due to a network error.
ERROR_DISCOVERY_FAILED_RESPONSE 20 The Discovery API failed.
ERROR_NO_AVAILABLE_STREAMS 21 No valid streams associated with the asset embed code were returned.
ERROR_PCODE_MATCH_FAILED 22 The asset embed code does not below to the pcode (aka API key) associated with that asset embed code. Asset embed codes should be associated with the pcode/API key for the account to authorize playback.
ERROR_DOWNLOAD_FAILURE 23 The attempt to download the stream for offline playback failed to complete.
ERROR_DEVICE_CONCURRENT_STREAMS 24 When attempting to play back the stream, it was found that the same user ID currently already has the maximum number of concurrent streams running.
ERROR_ADVERTISING_ID_FAILURE 25 The request for an ad failed.
ERROR_DISCOVERY_GET_FAILURE 26 The GET request for recommended videos (Discovery API) failed.
ERROR_DISCOVERY_POST_FAILURE 27 The POST request to the Discovery API failed.
ERROR_UNKNOWN 28 An unknown error occurred.

Authorization Error Codes

You can examine the authCode on your player object's current item (player().currentItem().authCode()) for possible errors. For details, see Authorization Errors.

Was this article helpful?