Error code 3 indicates that the ad request is successful, but the server does not return available ad assets. Check whether the ad slot ID takes effect and whether the test mobile phone is connected to the correct network. Alternatively, you can contact the customer service personnel.
The following table describes the error codes.
Error Code | Error Description |
0 | Internal error. |
1 | The ad request is invalid due to causes, such as not setting the ad slot ID or invalid banner ad size. |
2 | The ad request fails due to a network connection error. |
3 | The ad request is successful, but the server does not return any available ad material. |
4 | The ad is being requested and cannot be requested again. |
5 | The API version is not supported by the HUAWEI Ads SDK. |
6 | The banner ad has expired. |
7 | The banner ad task is removed. |
For details, please refer to the API Reference-AdParam.ErrorCode.
On mobile phones whose targetSdkVersion is 28 or later, ad video assets may fail to be downloaded. In this case, you need to configure the app to allow HTTP network requests. For details, please refer to Configuring Network Permissions.
If you are using a Chinese version mobile phone and Internet, only these two banner sizes are supported in China. All sizes are supported outside China. To connect to an environment outside China for testing, you need to use a mobile phone and network of the version outside China.
ads-lite SDK: provided for developers to quickly integrate HUAWEI Ads into your app. Once you've chosen an ad format, you're ready to start bringing in revenue using our high-quality advertising services.
ads-identifier SDK: provided for advertisers to use the OAID to deliver more personalized marketing campaigns and commercial ads for users to improve the conversion effect.
ads-installreferrer SDK: provided for third-party ad platforms or third-party tracking platforms. Advertisers can use the Install Referrer parameter provided to track app conversion channels and perform in-depth conversion effect analysis.
To integrate the HUAWEI Ads SDK, the HMS Core (APK) version of Android devices where your app is running must be 4.0.0 or later.
To view the HMS APK version on a device, go to Settings > Apps > Apps and search for HMS Core.
