Coder Social home page Coder Social logo

solar2d / com.solar2d-plugin.huaweiads Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kayahanbaskeser/hms-ads-kit-integration-into-corona-project

0.0 1.0 1.0 158 KB

Hms Ads Kit integration into Corona project

License: MIT License

Lua 2.68% Kotlin 65.24% Java 32.08%

com.solar2d-plugin.huaweiads's Introduction

Hms Ads Kit integration into Solar2d (Corona) project

Project Setup

To use the plugin please add following to build.settings

{
    plugins = {
        ["plugin.huaweiads"] = {
            publisherId = "com.solar2d",
        },
    },
}

Short documentation

local ads = require "plugin.huaweiads"

local function adListener(event)
    print(event.type) -- banner or interstitialAd
    print(event.phase) -- loaded, failed, opened, clicked, leave, closed, impression
    print(event.isError) -- boolean, true if error occurred
    print(event.data) -- error code
end

ads.init(adListener) -- sets listener and inits ad framework
ads.show() -- does nothing, NoOp
ads.showBanner({adId="xx-xxx-xx"}) -- loads and shows banner ad
ads.interstitialAd({adId="xx-xxx-xx"}) -- loads and shows interstitial ad

Origins

Plugin is originally made as a demo for this article and moved to Solar2D Free Plugin directory afterwards.

https://medium.com/huawei-developers/hms-ads-kit-integration-into-solar2d-corona-project-a1b3fcaf8b09

ss

com.solar2d-plugin.huaweiads's People

Contributors

kayahanbaskeser avatar shchvova avatar

Watchers

 avatar

Forkers

etsaidev

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.