# AdError

**package com.intowow\.sdk**

**public class AdError**

this class is used for getting error information by AdListener when requesting ad fail.

| Public constructors                                                                                    |
| ------------------------------------------------------------------------------------------------------ |
| <p><a href="#AdError">AdError(int errorCode, String errorMsg)</a> <br> Instantiates a new AdError.</p> |

| Constants |                                                                                                                                                                                                                           |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| int       | <p><a href="#CODE_NETWORK_ERROR">CODE\_NETWORK\_ERROR</a> <br> There is something wrong with the network connection.</p>                                                                                                  |
| int       | <p><a href="#CODE_SERVER_ERROR">CODE\_SERVER\_ERROR</a> <br> The server occurs error, please contact with your Intowow account manager.</p>                                                                               |
| int       | <p><a href="#CODE_INTERNAL_ERROR">CODE\_INTERNAL\_ERROR</a> <br> The SDK occurs error, please contact with your Intowow account manager.</p>                                                                              |
| int       | <p><a href="#CODE_NO_FILL_ERROR">CODE\_NO\_FILL\_ERROR</a> <br> There is no ad to serve.</p>                                                                                                                              |
| int       | <p><a href="#CODE_SDK_INIT_NOT_READY_ERROR">CODE\_SDK\_INIT\_NOT\_READY\_ERROR</a> <br> The initialization of SDK has not yet been completed, please wait few seconds.</p>                                                |
| int       | <p><a href="#CODE_REQUEST_TIMEOUT_ERROR">CODE\_REQUEST\_TIMEOUT\_ERROR</a> <br> It is timeout for your requesting.</p>                                                                                                    |
| int       | <p><a href="#CODE_INVALID_PLACEMENT_ERROR">CODE\_INVALID\_PLACEMENT\_ERROR</a> <br> Please check your placement is correct.</p>                                                                                           |
| int       | <p><a href="#CODE_AD_NOT_SERVING_ERROR">CODE\_AD\_NOT\_SERVING\_ERROR</a> <br> This crystal id is disable, please contact with your Intowow account manager.</p>                                                          |
| int       | <p><a href="#CODE_SDK_HIBERNATE">CODE\_SDK\_HIBERNATE</a> <br> SDK is on hibernate status for some reason, such as access SD card error or the API level of an Android device is lower than the minimum API level 14.</p> |
| int       | <p><a href="#CODE_STORAGE_SPACE_NOT_ENOUGH">CODE\_STORAGE\_SPACE\_NOT\_ENOUGH</a> <br> Make sure your phone has enough storage space (at least 350 MB).</p>                                                               |
| int       | <p><a href="#CODE_PARAMETER_ERROR">CODE\_PARAMETER\_ERROR</a> <br> Make sure you have set non-null context and listener before you call loadAd();.</p>                                                                    |
| int       | <p><a href="#CODE_AD_RENDER_ERROR">CODE\_AD\_RENDER\_ERROR</a> <br> It maybe occurs in WebView format, please remove or replace this ad from UI.</p>                                                                      |

| Public methods |                                                                                     |
| -------------- | ----------------------------------------------------------------------------------- |
| int            | <p><a href="#getErrorCode">getErrorCode()</a> <br> Get the error code.</p>          |
| String         | <p><a href="#getErrorMessage">getErrorMessage()</a> <br> Get the error message.</p> |

## Public constructors

### AdError <a href="#aderror" id="aderror"></a>

AdError(int errorCode, String errorMsg)

Instantiates a new AdError.

| Parameters |                            |
| ---------- | -------------------------- |
| errorCode  | int: the ad error code.    |
| errorMsg   | String: the error message. |

## Constants

### CODE\_NETWORK\_ERROR <a href="#code_network_error" id="code_network_error"></a>

int CODE\_NETWORK\_ERROR

There is something wrong with the network connection.

Constant Value: 100

### CODE\_SERVER\_ERROR <a href="#code_server_error" id="code_server_error"></a>

int CODE\_SERVER\_ERROR

The server occurs error, please contact with your Intowow account manager.

Constant Value: 101

### CODE\_INTERNAL\_ERROR <a href="#code_internal_error" id="code_internal_error"></a>

int CODE\_INTERNAL\_ERROR

The SDK occurs error, please contact with your Intowow account manager.

Constant Value: 102

### CODE\_NO\_FILL\_ERROR <a href="#code_no_fill_error" id="code_no_fill_error"></a>

int CODE\_NO\_FILL\_ERROR

There is no ad to serve.

Constant Value: 103

### CODE\_SDK\_INIT\_NOT\_READY\_ERROR <a href="#code_sdk_init_not_ready_error" id="code_sdk_init_not_ready_error"></a>

int CODE\_SDK\_INIT\_NOT\_READY\_ERROR

The initialization of SDK has not yet been completed, please wait few seconds.

Constant Value: 104

### CODE\_REQUEST\_TIMEOUT\_ERROR <a href="#code_request_timeout_error" id="code_request_timeout_error"></a>

int CODE\_REQUEST\_TIMEOUT\_ERROR

It is timeout for your requesting.

Constant Value: 105

### CODE\_INVALID\_PLACEMENT\_ERROR <a href="#code_invalid_placement_error" id="code_invalid_placement_error"></a>

int CODE\_INVALID\_PLACEMENT\_ERROR

Please check your placement is correct.

Constant Value: 106

### CODE\_AD\_NOT\_SERVING\_ERROR <a href="#code_ad_not_serving_error" id="code_ad_not_serving_error"></a>

int CODE\_AD\_NOT\_SERVING\_ERROR

This crystal id is disable, please contact with your Intowow account manager.

Constant Value: 107

### CODE\_SDK\_HIBERNATE <a href="#code_sdk_hibernate" id="code_sdk_hibernate"></a>

int CODE\_SDK\_HIBERNATE

SDK is on hibernate status for some reason, such as access SD card error or the API level of an Android device is lower than the minimum API level 14.

Constant Value: 108

### CODE\_STORAGE\_SPACE\_NOT\_ENOUGH <a href="#code_storage_space_not_enough" id="code_storage_space_not_enough"></a>

int CODE\_STORAGE\_SPACE\_NOT\_ENOUGH

Make sure your phone has enough storage space (at least 350 MB).

Constant Value: 109

### CODE\_PARAMETER\_ERROR <a href="#code_parameter_error" id="code_parameter_error"></a>

int CODE\_PARAMETER\_ERROR

Make sure you have set non-null context and listener before you call loadAd();

Constant Value: 110

### CODE\_AD\_RENDER\_ERROR <a href="#code_ad_render_error" id="code_ad_render_error"></a>

int CODE\_AD\_RENDER\_ERROR

It maybe occurs in WebView format, please remove or replace this ad from UI.

Constant Value: 111

## Public methods

### getErrorCode <a href="#geterrorcode" id="geterrorcode"></a>

int getErrorCode()

Get the error code.

| Returns |                 |
| ------- | --------------- |
| int     | the error code. |

### getErrorMessage <a href="#geterrormessage" id="geterrormessage"></a>

String getErrorMessage()

Get the error message.

| Returns |                    |
| ------- | ------------------ |
| String  | the error message. |
