Giter Site home page Giter Site logo

jisoo134 / hms-ads-demo-javascript Goto Github PK

View Code? Open in Web Editor NEW

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

0.0 0.0 0.0 41.11 MB

HUAWEI Ads Kit Sample code in JS version, which provides the banner, native, rewarded and interstitial ad formats for integration in H5 page

License: Apache License 2.0

Java 57.96% HTML 15.51% CSS 4.29% JavaScript 22.24%

hms-ads-demo-javascript's Introduction

HMS Ads Demo for JavaScript

English | 中文

Table of Contents

Introduction

The hms-ads-demo-javascript program demonstrates how to integrate the HMS Ads JavaScript API into a H5 Page and display ads.

Installation

Install the program on Huawei Android mobile phones.

Supported Environments

HMS Core (APK) 6.0.0 or later has been installed on Huawei Android phones.

Sample Code

The hms-ads-demo-javascript program integrates the HMS Ads JavaScript API and provides the pages for displaying banner, native, rewarded, interstitial ads respectively. The following html in the demo are used for loading and displaying ads and collecting user comments:

1). banner.html Loads and displays banner ads.
Code location: app\src\main\assets\banner.html

2). native.html Loads and displays native ads.
Code location: app\src\main\assets\native.html

3). reward.html Loads and displays rewarded ads.
Code location: app\src\main\assets\reward.html

4). interstitial.html Loads and displays interstitial ads.
Code location: app\src\main\assets\interstitial.html

5). ConsentActivity.java Collects user consent.
Code location: app\src\main\java\com\huawei\hms\ads\jsdemo\ConsentActivity.java

6). ProtocolActivity.java Collects user consent on privacy terms.
Code location: app\src\main\java\com\huawei\hms\ads\jsdemo\ProtocolActivity.java

Result

Banner Ads         Interstitial Ads

Reward Ads        Native Ads

Question or issues

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.

License

hms-ads-demo-javascript is licensed under the Apache License, version 2.0.

hms-ads-demo-javascript's People

Contributors

mike-mei avatar wwx5325878 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.