In this documentation we explained how to use Huawei-AdMost mediation plugin developed by AdMost. AdMost repository link is here
Banner Ad | Interstitial Ad | Rewarded Ad | Native Ad | |
---|---|---|---|---|
Native (Java/Kotlin) | ✅ | ✅ | ✅ | ✅ |
Unity | ✅ | ✅ | ✅ | ❌ |
- Sign in to Huawei Developer Console and create an AdUnit
-
Sign in to AdMost Dashboard
-
Click on the "+" sign on the "Networks Credentials" page and activate "Huawei Ads Network"
-
Create an "Ad Zone" Select your app and click on "+Zone"
-
Click on the "Placements"tab next to your app, then click on "+New Placement". These actions are all taken on the My Apps page.
-
After that, Users can list, edit, and delete all of your placements from "Placements" tab next to the app
-
Follow this link for the next integration steps
Note: This link also can be useful.
In the project-level build.gradle, include necessary Maven repositories.
repositories {
maven { url 'http://repo.admost.com:8081/artifactory/amr'; allowInsecureProtocol true } // Add this line
maven { url 'https://developer.huawei.com/repo/' } // Add this line
}
...
allprojects {
repositories {
maven { url 'http://repo.admost.com:8081/artifactory/amr'; allowInsecureProtocol true } // Add this line
maven { url 'https://developer.huawei.com/repo/' } // Add this line
}
}
dependencies {
implementation 'com.android.volley:volley:1.2.1'
implementation 'com.admost.sdk:amr:2.6.6'
implementation 'com.google.android.gms:play-services-base:17.1.0'
implementation 'com.admost.sdk:admost-adapter:1.1.1.a32'
implementation 'com.admost.sdk:huawei-ads-adapter:3.4.55.302.a32'
implementation 'com.huawei.hms:ads-identifier:3.4.46.300'
}
Important Note : AdMost-Huawei Mediation SDK is released and maintained by AdMost team. Please use this link if you have any issues or feedbacks.
The HUAWEI Ads SDK (com.huawei.hms:ads) has integrated the required permissions. Therefore, you do not need to apply for these permissions.
android.permission.ACCESS_NETWORK_STATE: Checks whether the current network is available.
android.permission.ACCESS_WIFI_STATE: Obtains the current Wi-Fi connection status and the information about WLAN hotspots.
android.permission.BLUETOOTH: Obtains the statuses of paired Bluetooth devices. (The permission can be removed if not necessary.)
android.permission.CAMERA: Displays AR ads in the Camera app. (The permission can be removed if not necessary.)
android.permission.READ_CALENDAR: Reads calendar events and their subscription statuses. (The permission can be removed if not necessary.)
android.permission.WRITE_CALENDAR: Creates a calendar event when a user clicks the subscription button in an ad. (The permission can be removed if not necessary.)
Before building the APK, configure the obfuscation configuration file to prevent the HUAWEI Ads SDK () from being obfuscated.
Open the obfuscation configuration file proguard-rules.pro in the app-level directory of your Android project, and add configurations to exclude the HUAWEI Ads SDK from obfuscation.
-keep class com.huawei.openalliance.ad.** { *; }
-keep class com.huawei.hms.ads.** { *; }
To allow HTTP and HTTPS network requests on devices with targetSdkVersion 28 or later, configure the following information in the AndroidManifest.xml file :
<activity
...
android:usesCleartextTraffic="true"
>
...
</activity>
Latest version
This section demonstrates how to use AdMost mediation feature with Huawei Ads Kit on Native android app.
Firstly, integrate the AdMost Mediation SDK for Android
AdMost Mediation SDK can be used for all ad types.
Note :
- Developers can find app level build.gradle in their project from "app-folder/app/build.gradle"
- If you use the native ad format in your application, please submit a ticket here to get support from Huawei.
To use Banner ads in Native android apps, please check the AdMost Mediation SDK. Click here to get more information about AdMost Mediation SDKs Banner Ad development.
To use Interstitial ads in Native android apps, please check the AdMost Mediation SDK. Click here to get more information about AdMost Mediation SDKs Interstitial Ad development.
To use Rewarded ads in Native android apps, please check the AdMost Mediation SDK. Click here to get more information about AdMost Mediation SDKs Rewarded Ad development.
To use Native ads in Native android apps, please check the AdMost Mediation SDK. Click here to get more information about AdMost Mediation SDKs Native Ad development.
![]() Banner Ad |
![]() Interstitial Ad |
![]() Rewarded Ad |
![]() Native Ad |