English | 中文
The Video Ad Serving Template (VAST) specification is defined and released by the Interactive Advertising Bureau (IAB).Currently, Petal Ads supports only linear ads (pre-roll, mid-roll, and post-roll ads) under this specification.The VAST ad sample code provided by Petal Ads describes how to display linear ads by integrating the Petal Ads VAST SDK into your app. If you want to use the default player, integrate the HUAWEI Player SDK as well.
Install the program on Huawei Android mobile phones.
No additional configuration is required.
HMS Core (APK) 5.0.3 or later has been installed on Huawei Android phones.
The VAST ad sample code provided by Petal Ads describes how to display linear ads by integrating the Petal Ads VAST SDK into your app. If you want to use the default player, integrate the HUAWEI Player SDK as well.
1). DemoApplication.java
Initializing the SDK.
Code location: app/src/main/java/com/huawei/hms/ads/vast/DemoApplication.java
2). LinearAdActivity.java
Loads and displays linear ads.
Code location: app/src/main/java/com/huawei/hms/ads/vast/demo/LinearAdActivity.java
linear Ads
If you want to evaluate more about HMS Core, HMSCore on Reddit is for you to keep up with latest news about HMS Core, and to exchange insights with other developers.
If you have questions about how to use HMS samples, try the following options:
- Stack Overflow is the best place for any programming questions. Be sure to tag your question with
huawei-mobile-services
. - Huawei Developer Forum HMS Core Module is great for general questions, or seeking recommendations and opinions.
If you run into a bug in our samples, please submit an issue to the Repository. Even better you can submit a Pull Request with a fix.
hms-ads-demo-javascript is licensed under the Apache License, version 2.0.