Giter Site home page Giter Site logo

mbilawalghaffar / hms-ads-demo-java Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hms-core/hms-ads-demo-java

0.0 0.0 0.0 57.5 MB

HUAWEI Ads SDK sample code. HUAWEI Ads SDK provides the banner, native, rewarded, interstitial and splash ad formats for integration.

Home Page: https://developer.huawei.com/consumer/en/doc/development/HMS-Guides/ads-sdk-introduction?ha_source=hms1

License: Apache License 2.0

Java 100.00%

hms-ads-demo-java's Introduction

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.

hms-ads-demo-java's People

Contributors

chenqiuwei avatar wwx5325878 avatar mike-mei avatar liuxiaohong414 avatar songshang110 avatar ferprieto avatar tiantian0303 avatar mwshubham avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.