Coder Social home page Coder Social logo

com.solar2d-plugin.yodo1's Introduction

YODO1 MAS plugin

Version 4 of the Yodo1 API is not backwards compatible with version 3. If you used the old version of this plugin please check all of your methods and events with those listed below.

Yodo1 support site: https://support.yodo1.com

Note: MAS API version 4.6.0 added Native Ads, however this plugin does not yet support them. See: https://developers.yodo1.com/knowledge-base/android-native-ads-integration/

Setup build.settings

settings =
{
    android =
    {
        applicationChildElements =
        {
            [[
                <meta-data android:name="com.google.android.gms.ads.APPLICATION_ID"
                    android:value="[YOUR_ADMOB_APP_ID]"/>  -- replace with your app id. See: https://goo.gl/fQ2neu
            ]],
        },
    },
    plugins = 
    {
        ["plugin.yodo1"] = { publisherId = "com.solar2d" },
    }, 
}

Docs

    Yodo1 MAS plugin 4.7.7

    appKey = "your_appKey" (required)
        Must match the appKey for this app in your Yodo1 account

    ccpaConsent = false
        If the user chooses to opt in to targeted advertising
        See https://developers.yodo1.com/knowledge-base/faq/

    gdprConsent = false
        If the user chooses to opt in to targeted advertising and tracking
        See https://developers.yodo1.com/knowledge-base/faq/

    coppaConsent = false
        Only set true if this app is targeted ONLY to children under 13
        See https://developers.yodo1.com/knowledge-base/coppa-compliance/

    adaptiveBannerEnabled = true
        Enable adaptive banner ads. May not be available on all platforms
        or devices. If enabled ensure adaptive ads are enabled for this appKey.
        See https://developers.yodo1.com/knowledge-base/ad-units/#Banner

    privacyDialogEnabled = true
        Enables the Yodo1 privacy dialog box, asking the user for their age.

    userAgreementUrl = ""
        If you enable the Yodo1 privacy dialog, you can supply your own user agreement URL

    privacyPolicyUrl = ""
        If you enable the Yodo1 privacy dialog, you can supply your own privacy policy URL

Sample app code

local yodo1 = require 'plugin.yodo1'

local function Yodo1Listener(event) { -- event.name = "yodo1"
    print("Yodo Event", event.type, event.phase, event.isError and event.errorType)
}

yodo1.init(Yodo1Listener, {
    appKey = "YourYodo1AppKey",
    gdprConsent = false,
    ccpaConsent = false,
    coppaConsent = false,
    adaptiveBannerEnabled = true,
    privacyDialogEnabled = true
})

yodo1.showBanner()
yodo1.hideBanner()
-- this method accepts any number of arguments. Leave only those which make sense
yodo1.setBannerAlign("left", "horizontalCenter", "right", "top", "verticalCenter", "bottom")

yodo1.showInterstitial()
yodo1.showRewardedVideo()

yodo1.isRewardedVideoLoaded() -- returns boolean
yodo1.isInterstitialLoaded() -- returns boolean

Event yodo1

Function Type Phases
init() init success,error
showBanner() banner opened, closed, error
showInterstitial() interstitial opened, closed, error
showRewardedVideo() reward opened, closed, error,earned

Events with phase "error" have isError set to true and errorType to the error string.

Updating this plugin

To future maintainers of this plugin:

  • update the version of Yodo1MAS API in these files:
    • README.md
    • plugins/2020.3607/android/corona.gradle
    • src/Corona/main.lua
    • src/android/plugin/build.gradle
  • make code changes in src/android/plugin/src/main/java/plugin/yodo1/LuaLoader.java to support the updated API
  • after making code changes, run gradle assemble and then manually copy the compiled AAR into the plugin directory:
    • cp src/android/plugin/build/outputs/aar/plugin-release.aar plugins/2020.3607/android/yodo1.aar

com.solar2d-plugin.yodo1's People

Contributors

prairiewest avatar shchvova avatar rafaykhan99 avatar

Stargazers

Wei Zhang avatar Eric Hu avatar zhangyongxue-eva avatar  avatar Arpat avatar Eliyar Eziz avatar Terry avatar Nicky avatar

Watchers

 avatar  avatar James Cloos avatar  avatar

Forkers

prairiewest

com.solar2d-plugin.yodo1's Issues

App failed to build with the plugin

Hello,
It appears that building with Solar2D fails when adding this plugin.
Here is what is in the console :
FAILURE: Build failed with an exception.
00:33:39.223
00:33:39.223 * What went wrong:
00:33:39.223 Execution failed for task ':App:checkReleaseAarMetadata'.
00:33:39.223 > Could not resolve all files for configuration ':App:releaseRuntimeClasspath'.
00:33:39.223 > Could not resolve com.yodo1:advert-gp:3.13.0.
00:33:39.223 Required by:
00:33:39.223 project :App
00:33:39.223 > Could not resolve com.yodo1:advert-gp:3.13.0.
00:33:39.223 > Could not get resource 'https://dl.bintray.com/yodo1/android-sdk/com/yodo1/advert-gp/3.13.0/advert-gp-3.13.0.pom'.
00:33:39.223 > Could not GET 'https://dl.bintray.com/yodo1/android-sdk/com/yodo1/advert-gp/3.13.0/advert-gp-3.13.0.pom'. Received status code 403 from server: Forbidden
00:33:39.223 > Could not resolve com.yodo1:advert-gp:3.13.0.
00:33:39.223 > Could not get resource 'https://applovin.bintray.com/Android-Adapter-SDKs/com/yodo1/advert-gp/3.13.0/advert-gp-3.13.0.pom'.
00:33:39.223 > Could not GET 'https://applovin.bintray.com/Android-Adapter-SDKs/com/yodo1/advert-gp/3.13.0/advert-gp-3.13.0.pom'. Received status code 403 from server: Forbidden
00:33:39.223 > Could not resolve com.yodo1:advert-gp:3.13.0.
00:33:39.223 > Could not get resource 'https://dl.bintray.com/ironsource-mobile/android-sdk/com/yodo1/advert-gp/3.13.0/advert-gp-3.13.0.pom'.
00:33:39.223 > Could not GET 'https://dl.bintray.com/ironsource-mobile/android-sdk/com/yodo1/advert-gp/3.13.0/advert-gp-3.13.0.pom'. Received status code 403 from server: Forbidden
00:33:39.223 > Could not resolve com.yodo1:advert-gp:3.13.0.
00:33:39.223 > Could not get resource 'https://chartboostmobile.bintray.com/Chartboost/com/yodo1/advert-gp/3.13.0/advert-gp-3.13.0.pom'.
00:33:39.223 > Could not GET 'https://chartboostmobile.bintray.com/Chartboost/com/yodo1/advert-gp/3.13.0/advert-gp-3.13.0.pom'. Received status code 403 from server: Forbidden
00:33:39.223 > Could not resolve com.yodo1:advert-gp:3.13.0.
00:33:39.223 > Could not get resource 'https://fyber.bintray.com/marketplace/com/yodo1/advert-gp/3.13.0/advert-gp-3.13.0.pom'.
00:33:39.223 > Could not GET 'https://fyber.bintray.com/marketplace/com/yodo1/advert-gp/3.13.0/advert-gp-3.13.0.pom'. Received status code 403 from server: Forbidden
00:33:39.223 > Could not resolve com.yodo1:advert-gp:3.13.0.
00:33:39.223 > Could not get resource 'https://dl.bintray.com/mintegral-official/mintegral_ad_sdk_android_for_oversea/com/yodo1/advert-gp/3.13.0/advert-gp-3.13.0.pom'.
00:33:39.223 > Could not GET 'https://dl.bintray.com/mintegral-official/mintegral_ad_sdk_android_for_oversea/com/yodo1/advert-gp/3.13.0/advert-gp-3.13.0.pom'. Received status code 403 from server: Forbidden
00:33:39.223
00:33:39.223 * Try:
00:33:39.223 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
00:33:39.223
00:33:39.223 * Get more help at https://help.gradle.org

Any help or correction possible?

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.