👨🏼💻How to use Huawei Ads with AddApptr Mediation (Native Android)?
Introduction
Hello, today I will be talking about Mediation as general and also I will specifically investigate Huawei Ads with AddApptr mediation in Native Android detailly. I will mention both AddApptr Dashboard and Android part to create an understanding. Lets Begin! 🎉
Ad mediation is the process of cooperating with different ad networks to find the most available ads in order to fill ad slots with more profitable and personalized adverts. AddApptr’s mission is to generate maximum advertising revenues for our app publishers and developers, while offering maximum service and tech support. We are dedicated to making life easier for our publishers.
As for Huawei, the Huawei alone shipped 240.6 million smartphones in 2019(source) ; as a result, Huawei’s market stands out to us as one with a significant user base and enormous potential. It is obvious that using Huawei Ads will improve revenue for publishers or developers.
If you want to use AddApptr, you could use its custom mediation feature to add Huawei Ads as one of your Ad sources to maximize your profit in your Android application.
In this article you will learn how to use AddApptr mediation to display Huawei Ads in Native Android step by step.
Test ad IDs will be used in this article. If you want to use your own ads, sign in to your Huawei Developer Console and create an AdUnit.
Add your app in Apps section
Go to AddApptr Dashboard and login with your AddApptr account.
On the Dashboard, you will see Add App at the top right of the screen, click to start adding an App.
Fill the necessary information about your application and click Add App.
Add a Placement
On the AddApptr Dashboard, go to Placements page and click on Add Placement on top right
Fill the necessary information in Add Placement screen.
After completing, you can see your Placement added
Add Network Key for Android
On the AddApptr interface, go to Network Keys page and click on Add Network Key on top right
Select your application and create a Shorthand.
Click on Add a custom key on the Add Network Key for Android page
Fill the necessary fields in Add a custom key page.
After adding the custom key, users can see the custom key below Huawei title and add the network key. In this case, it is a test ID. Click save when completed.
Add your application to a group on App Settings page
On the AddApptr interface, go to App Settings page and add your application to one of the groups. You can do this according to the Ad types specified at top right.
Click on the + sign in the groups and add your application. Fill the necessary places accordingly
The process is completed. You can continue with the Android part.
On your application
In the project-level build.gradle, include Huawei’s and AddApptr’s Maven repository
Add the following lines inside dependencies{} bracelets in /app/src/build.gradle file
It is highly recommended to enable AndroidX in your project. Editing gradle.properties file and adding the lines below(if they are not present) is required for most ad-network sdks.
Some ad networks might not work correctly because of cleartext HTTP traffic being disabled by default in Android 9. To make them work you need to enable cleartext traffic, for example by adding declaration in Manifest.xml like:
(Optional) Set location permissions in AndroidManifest.xml
Define your application name in AndroidManifest.xml
Initialize AATKit in MyApplication.onCreate() method. Setting of delegate is optional, but if you would like to obtain notifications about AATKit events you will need to implement the AATKit.Delegate interface.
Note: By default initializing AATKit will also enable so called shake-debug screen — special dialog with debugging information (like AATKit version and loaded ads) — after shaking the device. If you would like to disable this screen (for example when your application is a accelerometer controlled game), you can disable it in AATKitConfiguration, with code becoming:
But please keep in mind that, for most applications, it is advised to keep the debug screen enabled
Notify AATKit about MyActivity events
After completing this configurations, the mediation will be completed successfully.
For more information regarding Huawei Ads, refer to the official documentation here.
For more information regarding AddApptr mediation, refer to the official documentation here
Conclusion
To sum up, today I discussed mediation in general and looked closely into Huawei Ads using AddApptr mediation in Native Android. I brought up both the AddApptr Dashboard and the Android part to help people understand mediation and how it is used. See you later! 👋