Docy

Android Integration

1- Setup build.settings

You need to add this code in order to configure the plugin. The Admob ID is available in your MAS dashboard.

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

2- Initialize the SDK

You need to call this code to initialize the SDK. The AppKey is available in your MAS dashboard.

				
					yodo1.init(Yodo1Listener, {
    appKey = "YourAppKey",
    privacyDialogEnabled = true
})
				
			

3- Configure the banners

Show a banner

				
					yodo1.showBanner()
				
			

Align a banner

This method accepts any number of arguments. Use only those you need.

				
					yodo1.setBannerAlign("left", "horizontalCenter", "right", "top", "verticalCenter", "bottom")
				
			

Hide a banner

				
					yodo1.hideBanner()
				
			

4- Configure the interstitials

Check the status

				
					yodo1.isInterstitialLoaded()

				
			

Show an interstitial

				
					yodo1.showInterstitial()
				
			

5- Configure the rewarded ads

Check the status

				
					yodo1.isRewardedVideoLoaded()

				
			

Show a rewarded ad

				
					yodo1.showRewardedVideo()

				
			

6- Events

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

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

For the next step please test your integration.

This plugin is developed with the help of Todd Trann.

CONTENTS