Integration of Huawei Reward Ads and Interstitial Ads in Unity
Ads kit is powered by Huawei which allows the developer to monetization services such as Reward Ads and Interstitial ads.
Overview
In this article, I will create a demo game and integrate Huawei Ads Kit. So the developer can easily monetise their efforts using Reward Ads and Interstitial Ads. I will cover every aspect of the game development with Huawei Ads Kit.
Service Introduction
Ads kit is powered by Huawei which allows the developer to monetization services such as Reward Ads and Interstitial ads. HUAWEI Ads Publisher Service is a monetization service that leverages Huawei’s extensive data capabilities to display targeted, high-quality ad content in your game to the vast user base of Huawei devices.
Prerequisite
- Unity Engine (Installed in the system)
- Huawei phone
- Visual Studio 2019
- Android SDK & NDK (Build and Run)
Integration process
1. Sign In and Create or Choose a project on AppGallery Connect portal.
2. Navigate to Project settings and download the configuration file.
Game Development
1. Create a new game in Unity.
2. Click 3D, enter Project Name, and then click to CREATE.
3. Now add game components and let us start game development.
4. Download HMS Unity Plugin from below site.
https://github.com/EvilMindDevs/hms-unity-plugin/releases
5. Open Unity Engine and import the downloaded HMS Plugin.
Choose Assets > Import Package> Custom Package
6. Choose Huawei > App Gallery.
7. Provide the AppId and other details from agconnect-service.json file and click configure Manifest.
8. Create Huawei Ads based scripts.
I have created AdsDemoManager.cs file in which integrated Huawei Ads which display Reward Ad and Interstitial Ad functionality.
Click on AdsDemoManager.cs and open in Visual Studio 2019
Result
Let us build the apk and install in android device.
Tips and Tricks
- Download the latest HMS plugin.
- HMS plugin v1.2.0 supports 7 kits.
- HMS Unity Plugin v1.1.2 supports 5 kits.
Conclusion
In this article, We have learned how to integrate Huawei Ads Kit in Unity-based Game.
User can reward if the user watches ads and redeemed some points in Game.
Thanks for reading this article. Be sure to like and comments to this article if you found it helpful. It means a lot to me.
References