harmony 鸿蒙Advertisement
Advertisement
This module provides the capability of returning ads.
NOTE - The initial APIs of this module are supported since API version 11. Newly added APIs will be marked with a superscript to indicate their earliest API version.
How to Use
When using the advertising function, you can obtain the returned ad through Advertisement.
Advertisement
Atomic service API: This API can be used in atomic services since API version 12.
System capability: SystemCapability.Advertising.Ads
Name | Type | Read-Only | Optional | Description |
---|---|---|---|---|
adType | number | No | No | Ad type. - 1: splash ad. - 3: native ad. - 7: rewarded ad. - 8: banner ad. - 12: interstitial ad. - 60: roll ad. |
uniqueId | string | No | No | Unique ID of the ad. |
rewarded | boolean | No | No | Whether users get rewarded for watching or clicking the ad. - true: Users get rewarded. - false: Users do not get rewarded. |
shown | boolean | No | No | Whether the ad is shown. - true: The ad is shown. - false: The ad is not shown. |
clicked | boolean | No | No | Whether the ad is clicked. - true: The ad is clicked. - false: The ad is not clicked. |
rewardVerifyConfig | Map<string, string> | No | No | Server verification parameter. |
[key: string] | Object | No | Yes | Custom parameter. |
你可能感兴趣的鸿蒙文章
harmony 鸿蒙Ads Service Framework Error Codes
harmony 鸿蒙@ohos.advertising.AdComponent (Non-Full-Screen Ad Component)
harmony 鸿蒙@ohos.advertising.AdsServiceExtensionAbility (ExtensionAbility for Ads) (System API)
harmony 鸿蒙@ohos.advertising.AdsServiceExtensionAbility (ExtensionAbility for Ads)
harmony 鸿蒙@ohos.advertising (Ads Service Framework)
harmony 鸿蒙@ohos.advertising.AutoAdComponent (Carousel Ad Component)
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦