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 =
{
[[
-- 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 |
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.
For the next step please test your integration.
This plugin is developed with the help of Todd Trann.