The Ads Service provides the ability to access different types of advertisements for OpenHarmony projects. By integrating Ads Kit, you can integrate Banner Ads, Rewarded Ads, Interstitial Ads and Splash Ads directly into your application.
For more information, you can click the following link to reach directly:
To integrate with Ads service:
Open the OpenHarmonySDKKitsSettings window.
Fill in the common configuration include client_id
, app_id
, Bundle Name
.
Check the Ads Kit.
Check the certain type of Ads.
Click on Open Scene
to open the demo scene with the interface integrated, and operate each function in the scene.
To open the Ads Service demo scene in the Tuanjie Editor: OpenHarmonySDKKits > OpenHarmonySDKKitsSettings > Ads Kit > Open Scene.
There are 4 integrated ad types built into the scene. Click the corresponding button to load the corresponding ads.
The functions of buttons and their calling interfaces are as follows:
Area | Description |
---|---|
show Banner Ads | Click to load and show the banner ads. |
show Rewarded Ads | Click to load and show the rewarded ads. |
show Interstitial Ads | Click to load and show the interstitial ads. The default is non-full screen display, and the size can be adjusted as needed. |
show Splash Ads | Click to load and show the splash ads. The default is non-full screen display, and the size can be adjusted as needed. |
Output Log | The relevant log will be displayed here. |
To run the demo on the OpenHarmony devices:
client_id
, app_id
and Bundle Name
have been filled correctly. Make sure Ads Kit have been checked.