All Projects → HMS-Core → hms-ads-demo-java

HMS-Core / hms-ads-demo-java

Licence: Apache-2.0 License
HUAWEI Ads SDK sample code. HUAWEI Ads SDK provides the banner, native, rewarded, interstitial and splash ad formats for integration.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to hms-ads-demo-java

hms-ads-demo-kotlin
HUAWEI Ads Kit Sample code in kotlin version, which provides the banner, native, rewarded, roll, interstitial and splash ad formats for integration
Stars: ✭ 16 (-64.44%)
Mutual labels:  ads, hms
hms-safetydetect-demo-android
SafetyDetect Sample provides many sample programs for your reference or usage.This example demonstrates how to integrate services provided by Safetydetect Kit, such as APPchecks, URLcheck, Userdetect, Wifidetect.
Stars: ✭ 16 (-64.44%)
Mutual labels:  hms
hms-video-editor-demo
HUAWEI Video Editor Kit provides full video editing functions like video import/export, editing and rendering. This sample code is used to describe how to integrate the Video Editor Kit SDK.
Stars: ✭ 45 (+0%)
Mutual labels:  hms
ioBroker.beckhoff
ioBroker Adapter to Communicate with Beckhoff Automation System over ADS
Stars: ✭ 14 (-68.89%)
Mutual labels:  ads
alternative-frontends
🔐🌐 Privacy-respecting web frontends for popular services
Stars: ✭ 821 (+1724.44%)
Mutual labels:  ads
hms-iap-serverdemo
IAP server sample encapsulates APIs of the HUAWEI IAP server. It provides many sample programs for your reference or usage. The repository contains 8 branches of java, csharp, golang, nodejs, perl, php, python and ruby demo.
Stars: ✭ 20 (-55.56%)
Mutual labels:  hms
hms-location-demo
HUAWEI Location Kit sample code encapsulates APIs of the HUAWEI Location Kit. It provides many sample programs for your reference or usage.
Stars: ✭ 32 (-28.89%)
Mutual labels:  hms
unbound-dns-firewall
DNS-Firewall Python script for UNBOUND
Stars: ✭ 23 (-48.89%)
Mutual labels:  ads
hms-react-native-plugin
This repo contains all of React-Native HMS plugins.
Stars: ✭ 167 (+271.11%)
Mutual labels:  hms
FacebookAds
This is an Android app that displays all the Facebook Mobile Ads based on Audience Network SDK. This repo uses all the major ad-types in a separate activity for all the ads.
Stars: ✭ 16 (-64.44%)
Mutual labels:  ads
map-kit-android
An extensive framework for map development in Android.
Stars: ✭ 44 (-2.22%)
Mutual labels:  hms
GoHole
GoHole is a DNS server written in Golang with the same idea than the PiHole, blocking advertisements's and tracking's domains
Stars: ✭ 28 (-37.78%)
Mutual labels:  ads
CyberSecurity-Box
Firewall-System based on OpenWRT or Pi-Hole with UnBound, TOR, optional Privoxy, opt. ntopng and opt. Configuration of the AVM FRITZ!Box with Presets for Security and Port-List. Please visit:
Stars: ✭ 20 (-55.56%)
Mutual labels:  ads
pihole-blocklists
Domain blocklists for Pi-Hole that are free and open for use by everyone.
Stars: ✭ 13 (-71.11%)
Mutual labels:  ads
hms-3d-modeling-demo
HUAWEI 3D Modeling Kit project contains a sample app. Guided by this demo, you will be able to implement full 3D Modeling Kit capabilities, including 3D object reconstruction and material generation.
Stars: ✭ 45 (+0%)
Mutual labels:  hms
Firebase-HMS-ML-Kit-Scanner-Demo
Various scanner use cases using Firebase or HMS ML-Kit
Stars: ✭ 22 (-51.11%)
Mutual labels:  hms
node-ads
NodeJS Twincat ADS protocol implementation
Stars: ✭ 49 (+8.89%)
Mutual labels:  ads
SoftBeckhoff
Virtual Beckhoff PLC for local testing with docker support
Stars: ✭ 40 (-11.11%)
Mutual labels:  ads
ScrollHmsPicker
A simple scrollable HMS time picker view for Android.
Stars: ✭ 30 (-33.33%)
Mutual labels:  hms
hms-analytics-demo-android
HmsAnalyticsKitDemo is a app that applying HUAWEI Hianalytics SDK used for showing how to collect user engagement and user preference.
Stars: ✭ 19 (-57.78%)
Mutual labels:  hms

HMS Core Ads Kit Sample Code (Java)

English | 中文

Contents

Introduction

The Java sample code provided by Ads Kit describes how to display ads by integrating the HUAWEI Ads SDK into your Android app.

Installation

Install the sample code on a Huawei phone.
You can use HMS Toolkit to quickly run the sample code. HMS Toolkit supports one-stop kit integration, and provides functions such as free app debugging on remote real devices. To learn more about HMS Toolkit, please refer to the HMS Toolkit documentation.

Configuration Management

N/A

Environment Requirements

Your Huawei phone has HMS Core (APK) 4.0.0 or later installed.

Sample Code

The Java sample code provided by Ads Kit integrates the HUAWEI Ads SDK, which offers a range of ad formats including banner, native, rewarded, interstitial, splash, and roll ads. The sample code contains the following files for you to load and display ads and obtain user consent:

(1) BannerActivity.java Used to load and display banner ads.
Storage path: app\src\main\java\com\huawei\hms\ads\sdk\BannerActivity.java

(2) NativeActivity.java Used to load and display native ads.
Storage path: app\src\main\java\com\huawei\hms\ads\sdk\NativeActivity.java

(3) RewardActivity.java Used to load and display rewarded ads.
Storage path: app\src\main\java\com\huawei\hms\ads\sdk\RewardActivity.java

(4) InterstitialActivity.java Used to load and display interstitial ads.
Storage path: app\src\main\java\com\huawei\hms\ads\sdk\InterstitialActivity.java

(5) SplashActivity.java Used to load and display splash ads.
Storage path: app\src\main\java\com\huawei\hms\ads\sdk\SplashActivity.java

(6) InstreamActivity.java Used to load and display roll ads.
Storage path: app\src\main\java\com\huawei\hms\ads\sdk\InstreamActivity.java

(7) ConsentActivity.java Used to obtain user consent.
Storage path: app\src\main\java\com\huawei\hms\ads\sdk\ConsentActivity.java

(8) ProtocolActivity.java Used to obtain users' consent on the privacy statement.
Storage path: app\src\main\java\com\huawei\hms\ads\sdk\ProtocolActivity.java

Running Result

Banner ads         Interstitial ads        Native ads

Reward ads         Roll ads        Splash ads

Technical Support

You can visit the Reddit community to obtain the latest information about HMS Core and communicate with other developers.

If you have any questions about the sample code, try the following:

  • Visit Stack Overflow, submit your questions, and tag them with huawei-mobile-services. Huawei experts will answer your questions.
  • Visit the HMS Core section in the HUAWEI Developer Forum and communicate with other developers.

If you encounter any issues when using the sample code, submit your issues or submit a pull request.

License

The sample code is licensed under Apache License 2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].