[Appodeal] Not able to get appodeal ads to show

Hi I am still a newbie to Corona and need help to identify where I am going wrong.

I have tried to implement Appodeal since I lost all my revenue with admob for almost a year now as it appears ads stopped showing.

My aim

- Click the shuffle button, this would load the reward ads, then reward user

- When menu scene is created, banner ads should show

When i tried implementing it, I am getting

04-03 10:07:53.885 3718 3892 I Corona : ERROR: appodeal.load(adUnitType [, op tions]), adUnitType (string) expected, got: nil

This is my setup:

build.settings

settings = { plugins = { -- Base ["plugin.appodeal.base"] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.StartApp'] = { publisherId = 'com.coronalabs' }, -- Banner ['plugin.appodeal.AppLovin'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.MillenialMedia'] = { publisherId = 'com.coronalabs' }, -- Interstitial ['plugin.appodeal.Chartboost'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.AppLovin'] = { publisherId = 'com.coronalabs' }, -- Rewarded Video ['plugin.appodeal.AppLovin'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.Chartboost'] = { publisherId = 'com.coronalabs' }, -- Others ["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs" }, ["CoronaProvider.native.popup.activity"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, ["iphone-sim"]=true }, }, ["plugin.google.iap.v3"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["CoronaProvider.gameNetwork.google"] = { publisherId = "com.coronalabs", supportedPlatforms = { android = true }, }, ["CoronaProvider.gameNetwork.apple"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, ["iphone-sim"]=true }, }, }, orientation = { default = "portrait", --landscapeRight supported = { "portrait", } }, iphone = { plist = { UIStatusBarHidden = true, UIAppFonts = { -- }, CFBundleIconFiles = { "Icon.png", "Icon@2x.png", "Icon-40.png", "Icon-40@2x.png", "Icon-60.png", "Icon-60@2x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-76.png", "Icon-76@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", "Icon-Small.png", "Icon-Small@2x.png", "Icon-Small-40.png", "Icon-Small-40@2x.png" } } }, android = { googlePlayGamesAppId = "xxxxxxxx", --insert your app id number for google game services usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", "android.permission.READ\_PHONE\_STATE", "android.permission.WRITE\_EXTERNAL\_STORAGE", "com.android.vending.BILLING", } } }

menu.lua

-- Functions local buttonTouched local rewardType = nil -- appodeal init local appodeal = require( "plugin.appodeal" ) -- appodeal local function adListener( event ) if ( event.phase == "init" ) then -- Successful initialization print( event.isError ) -- Load an appodeal ad appodeal.show( "banner", { yAlign="bottom" } ) elseif ( event.phase == "loaded" ) then -- The ad was successfully loaded print( event.type ) -- Show the ad appodeal.show(rewardedVideo) elseif ( event.phase == "failed" ) then -- The ad failed to load print( event.type ) print( event.isError ) print( event.response ) elseif ( event.phase == "displayed" or event.phase == "playbackBegan" ) then -- The ad was displayed/played print( event.type ) elseif ( event.phase == "playbackEnded" ) then -- The ad was closed/hidden print( event.type ) if rewardType == "buyshuffle" then utils.shuffles = utils.shuffles + 1 label\_shuffle.text = "+" ..utils.shuffles utils.playSound("cash") utils.savePlayerInfo() elseif rewardType == "buysaveme" then utils.savecount = utils.savecount + 1 label\_saveme.text = "+" ..utils.savecount utils.playSound("cash") utils.savePlayerInfo() end elseif ( event.phase == "clicked" ) then -- The ad was clicked/tapped print( event.type ) end end -- Initialize the appodeal plugin appodeal.init( adListener, { appKey="248994c7d572554f41fffb430e4baa69db1ebcc60c12f65a", disableAutoCacheForAdTypes={"banner", "interstitial", "rewardedVideo"}, disableWriteExternalPermissionCheck=true, supportedAdTypes={"banner", "interstitial", "rewardedVideo"} } ) local function buttonPress(event) if event.phase == "ended" then rewardType = event.target.reward appodeal.load( rewardedVideo ) end end function scene:create( event ) -- Display Shuffle buy button local button\_buyshuffle = display.newSprite(uiSheet, {frames={uiSheetInfo:getFrameIndex("buyshuffle")}}) button\_buyshuffle.x = \_W\*0.5 - button\_buyshuffle.width/2 - 0.5 button\_buyshuffle.y = mF(button\_rate.y + (button\_rate.height\*0.5) + (button\_rate.height\*0.5) + 3) button\_buyshuffle.reward = "buyshuffle" button\_buyshuffle:addEventListener("touch", buttonPress) uiGroup:insert(button\_buyshuffle)

You need to put a quote around the type or lua looks for the value of that property:

So this:

appodeal.load( rewardedVideo )

Sould be this:

appodeal.load( “rewardedVideo” )

Thanks and what a silly error on my part :frowning:

Also thanks to Rob’s reply in this thread, that helped me resolve my banner ads

https://forums.coronalabs.com/topic/70565-how-to-integrate-appodeal/

You need to put a quote around the type or lua looks for the value of that property:

So this:

appodeal.load( rewardedVideo )

Sould be this:

appodeal.load( “rewardedVideo” )

Thanks and what a silly error on my part :frowning:

Also thanks to Rob’s reply in this thread, that helped me resolve my banner ads

https://forums.coronalabs.com/topic/70565-how-to-integrate-appodeal/