New modular Appodeal plugin not being included in Android Build

I am using corona build 3125 and it doesn’t have a problem. I have 2 apps on the play store at the moment with the new plugin. I believe you have to use all the items listed under base.  I see you removed Amazon, Google, Twitter and StartApp, but somebody here will probably confirm.

From the documentation:

Make sure to include Base block for a plugin to work correctly.

Here is my build:

-- Base ['plugin.appodeal.base'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.AmazonAds'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.GoogleAdMob'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.TwitterMoPub'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.StartApp'] = { publisherId = 'com.coronalabs' }, -- Banner ['plugin.appodeal.MillenialMedia'] = { publisherId = 'com.coronalabs' }, -- Interstitial ['plugin.appodeal.IronSource'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.StartApp'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.MillenialMedia'] = { publisherId = 'com.coronalabs' }, -- Rewarded Video ['plugin.appodeal.IronSource'] = { publisherId = 'com.coronalabs' }, ['plugin.appodeal.StartApp'] = { publisherId = 'com.coronalabs' },

@agramonte, thanks for your help. I wound up uninstalling the app from my device and used your build settings and the plugin started working. Then I uninstalled again, reverted back to the original build settings that I had, and the plugin still worked. Maybe I just had to do a fresh install to get it working?

I can’t say that I completely understand how this modular plugin works. For example, in the docs [‘plugin.appodeal.StartApp’] = { publisherId = ‘com.coronalabs’ } is listed in Base, Interstitial, and Rewarded Video but technically the other two instances should overwrite the first. Perhaps they are just explaining which networks belong to which categories.

One last thing, would you happen to know how to enable skippable videos in Appodeal?

Just to be clear, you should include all parts of each block. I specifically asked Engineering if users could only choose providers they want. And that’s not what modularity is about. Modularity is about choosing Interstilals vs. Banners. If you include banners, you should include all the providers in that block of code and not just select providers.

Rob

@rob I understand what you are saying, but for now, I am happy with the results. I need to use flurry for analytics so at the very least I can keep the blocks as is and just remove flurry. Hopefully, this will not cause me much of a headache or crashes (so far it has not) and I understand if in the future it isn’t supported or the feature might not work. But if the feature does not work in the future, I can always switch back to AdMob.

@vince_ No. I don’t know how to switch from skippable to non-skippable for videos.

@Rob, thanks for weighing in. The docs seem to contradict what you are saying, though. According to the docs you can leave out specific providers:

Note

Disabling specific ad types and ad providers at this level with the help of new modular structure can greatly reduce the final build size.

and:

If for some reason you don’t want to show ads from specific ad provider (for the sake of example, let it be Flurry), you can comment out it too, like this:

– Banner

[‘plugin.appodeal.AppLovin’] = { publisherId = ‘com.coronalabs’ },

[‘plugin.appodeal.FacebookAudience’] = { publisherId = ‘com.coronalabs’ },

–[‘plugin.appodeal.Flurry’] = { publisherId = ‘com.coronalabs’ },

[‘plugin.appodeal.InMobi’] = { publisherId = ‘com.coronalabs’ },

[‘plugin.appodeal.MyTarget’] = { publisherId = ‘com.coronalabs’ },

[‘plugin.appodeal.MillenialMedia’] = { publisherId = ‘com.coronalabs’ },

[‘plugin.appodeal.Yandex’] = { publisherId = ‘com.coronalabs’ },

If you are sure of your choice and want to keep your build settings nice and clean, you can remove commented ad types or/and adapters.

On another note, I keep getting this error in the console when checking if an interstitial is loaded:

ERROR: appodeal.load(adUnitType [, options]), Request ignored. You didn't specify 'interstitial' in supportedAdTypes during init()

This is what my init looks like:

appodeal.init( listener, { appKey=initAppId, testMode=true, -- autoCacheAds=true, childDirectedTreatment=true, disableAutoCacheForAdTypes={"banner"}, disableWriteExternalPermissionCheck=true, supportedAdTypes={"interstitial", "rewardedVideo"} } )

Hi guys!

About disabling specific ad provider: it was an undocumented feature at the moment Rob discussed it with me. Now we’ve decided to release it for public, since it can be really useful for some of our users.

Vince_, about your problem, can you prepare a sample to reproduce that issue and submit it on https://portal.coronalabs.com/bug-submission ? Like, testing is as much important, as development and all test cases went correct. I’ve personally tested interstitial loading/checking just now and all went fine.

More often users are finding out what’s wrong with their code for themselves when they are preparing such sample, but if the problem will persist, we can easily fix it for you with a sample on our hands.

So for those who know this old Saturday Night Live reference, in the infamous words of Emily Latila… “Never mind”.

I’m looking to update the blog post to be more clear on this. Clearly, it is a good benefit to exclude Flurry ads if you want to use Flurry analytics.  

Rob

I have submitted a bug report for 2 issues:

  1. I can’t use the autoCacheAds parameter at all - it just throws an error and won’t initialize

  2. Getting an error mesage when calling appodeal.load - the issue that I mentioned above.

The ticket number is

12672853

Btw, is there any kind of tutorial for how to setup the backend on Appodeal?

I would think Appodeal tutorials would be found on Appodeal’s site.

Rob

Hi Vince_,

Thanks for the submission, the work on the issues is already in progress.

@karpovpw Thanks for looking into so quickly.

@Rob, the only documentation I see on Appodeal’s site is how to integrate the SDK. Nothing on how to use the dashboard itself. I have tried googling for this info but to no avail. If anyone has any links or can point me in the right direction that would be great.

Thanks.

Hi Vince_,

The problem that you’ve mentioned is solved. We’ve updated docs to more clearly display that autoCacheAds parameter is deprecated and replaced by disableAutoCacheForAdTypes.
 

So you should be using disableAutoCacheForAdTypes parameter instead too and everything will work flawlessly.

Also, we’ve altered a log error to be more specific about what is wrong with init parameters.

So, thanks for your feedback and as always, if you have any more questions or issues - feel free to share them, it’s easier to solve everything together!  ;) 

Hi, Vince! Thanks for bringing up the question about the dashboard! You can find more info here: https://blog.appodeal.com/blog/2017/05/16/the-appodeal-dashboard/. We are currently working on the video explanation of the dashboard, it’ll be available in some time.

You have also asked about enabling skippable video, they are accessible under interstitials section. Static interstitials and skippable videos are in the same format, interstitials. You can have them both, in this case, whichever ad will cost more, will be shown (either static or skippable video). You can manage interstitials in the app setting section and have enabled only one type of them. 

Thank you all for the help so far.

@Karina, do you have an email so I can ask you more questions about how to setup appodeal?

@Rob and @karpovpw, please see below.

I have tried building again and keep running into issues. With the disableAutoCacheForAdTypes parameter commented out, I still get an error when trying to load a live interstitial. Even though the listener function shows that an interstitial has been cached, when I check if it is loaded it returns false, then when trying to load the interstitial again I get the error I stated above.

02-09 12:13:18.802  8564  8612 I Corona  : appodeal listener
02-09 12:13:18.802  8564  8612 I Corona  :     type = interstitial
02-09 12:13:18.802  8564  8612 I Corona  :     isError = false
02-09 12:13:18.802  8564  8612 I Corona  :     phase = loaded
02-09 12:13:18.802  8564  8612 I Corona  :     provider = appodeal
02-09 12:13:18.802  8564  8612 I Corona  :     name = adsRequest
02-09 12:13:18.802  8564  8612 I Corona  : appodeal cached    interstitial

02-09 12:13:31.251  8564  8612 I Corona  : appodeal interstitial is not available…attempting to load

ERROR: appodeal.load(adUnitType [, options]), Request ignored. You didn’t specify ‘interstitial’ in supportedAdTypes during init()

Loading and displaying a live rewardedVideo seems to work fine however.

With the disableAutoCacheForAdTypes parameter enabled, nothing will load at all when calling appodeal.load. This is the code:

local function listener(event) print("appodeal listener") for k, v in pairs( event ) do print( "\t"..tostring(k).. " = ".. tostring(v) ) end if event.isError == true then print("appodeal error") elseif event.phase == "init" then appodeal.load("interstitial") appodeal.load("rewardedVideo") elseif event.phase == "loaded" then print("appodeal cached", event.type) elseif event.phase == "playbackEnded" then if event.type == "rewardedVideo" then print("appodeal give reward") end elseif event.phase == "closed" then print("appodeal closed") end end appodeal.init( listener, { appKey="xxxxxxx", -- testMode=true, disableAutoCacheForAdTypes={"interstitial", "rewardedVideo"}, childDirectedTreatment=true, disableAutoCacheForAdTypes={"banner"}, disableWriteExternalPermissionCheck=true, supportedAdTypes={"interstitial", "rewardedVideo"} } )

When trying to load the ads in the init phase in the listener, I get this error:

02-09 13:18:06.921 27958 29809 I Corona : appodeal listener 02-09 13:18:06.921 27958 29809 I Corona : phase = init 02-09 13:18:06.921 27958 29809 I Corona : provider = appodeal 02-09 13:18:06.921 27958 29809 I Corona : name = adsRequest 02-09 13:18:06.921 27958 29809 I Corona : isError = false 02-09 13:18:06.921 27958 29809 I Corona : ERROR: appodeal.load(adUnitType [, options]), Request ignored. You didn't specify 'interstitial' in supportedAdTypes during init() 02-09 13:18:06.922 27958 29809 I Corona : ERROR: appodeal.load(adUnitType [, options]), Request ignored. You didn't specify 'rewardedVideo' in supportedAdTypes during init()

Hi Vince_,

Remove the duplication of disableAutoCacheForAdTypes parameter from your init parameters table (and don’t forget to move the “banner” type where it needs to be).

Vince, please reach out to hi@appodeal.com, either I or someone from Appodeal support will reply. We also have a 24/7 chat on appodeal.com (right bottom corner).

@karpovpw, good catch on the duplicate entry. I removed it, however the issue still persists when trying to show a live interstitial. The weird thing is that the listener reports successfully loading an interstitial, but then calling appodeal.isLoaded(“interstitial”) returns false_._ I should probably note that I don’t have Admob connected to my account, but even if that is the cause of the bug, shouldn’t it fallback to a different network?

Again, the rewardedVideos seem to work fine - it keeps showing AdColony videos.

I am afraid to continue testing with live ads as I don’t want to be flagged for fraudulent activity.

I used mostly your code and it works for me as expected. How do you know that the AdColony ad you are seeing is not the interstitial?

local appodeal = require( "plugin.appodeal" ) local function listener(event) local json = require "json" print("Event response:", json.prettify(event)) if event.isError == true then print("appodeal error") elseif event.phase == "init" then appodeal.load("interstitial") appodeal.load("rewardedVideo") elseif event.phase == "loaded" then print("appodeal cached", event.type) if event.type == "interstitial" then if appodeal.isLoaded( "interstitial" ) then appodeal.show( "interstitial" ) end end elseif event.phase == "playbackEnded" then if event.type == "rewardedVideo" then print("appodeal give reward") end elseif event.phase == "closed" then print("appodeal closed") end end appodeal.init( listener, { appKey="xxx", -- testMode=true, childDirectedTreatment=true, disableAutoCacheForAdTypes={"banner", "interstitial", "rewardedVideo"}, disableWriteExternalPermissionCheck=true, supportedAdTypes={"interstitial", "rewardedVideo"} } )

And here are the logs:

02-12 18:52:25.416: I/Corona(24139): plugin.appodeal: 1.4.1 (SDK: 2.1.9) 02-12 18:52:25.436: V/Corona(24139): \> Class.forName: CoronaProvider.licensing.google.LuaLoader 02-12 18:52:25.436: V/Corona(24139): \< Class.forName: CoronaProvider.licensing.google.LuaLoader 02-12 18:52:25.436: V/Corona(24139): Loading via reflection: CoronaProvider.licensing.google.LuaLoader 02-12 18:52:25.616: I/Corona(24139): Event response: { 02-12 18:52:25.616: I/Corona(24139): "name":"adsRequest", 02-12 18:52:25.616: I/Corona(24139): "phase":"init", 02-12 18:52:25.616: I/Corona(24139): "provider":"appodeal", 02-12 18:52:25.616: I/Corona(24139): "isError":false 02-12 18:52:25.616: I/Corona(24139): } 02-12 18:52:29.936: I/Corona(24139): Event response: { 02-12 18:52:29.936: I/Corona(24139): "name":"adsRequest", 02-12 18:52:29.936: I/Corona(24139): "phase":"loaded", 02-12 18:52:29.936: I/Corona(24139): "provider":"appodeal", 02-12 18:52:29.936: I/Corona(24139): "type":"rewardedVideo", 02-12 18:52:29.936: I/Corona(24139): "isError":false 02-12 18:52:29.936: I/Corona(24139): } 02-12 18:52:29.936: I/Corona(24139): appodeal cached rewardedVideo 02-12 18:52:33.636: I/Corona(24139): Event response: { 02-12 18:52:33.636: I/Corona(24139): "name":"adsRequest", 02-12 18:52:33.636: I/Corona(24139): "phase":"loaded", 02-12 18:52:33.636: I/Corona(24139): "provider":"appodeal", 02-12 18:52:33.636: I/Corona(24139): "type":"interstitial", 02-12 18:52:33.636: I/Corona(24139): "isError":false 02-12 18:52:33.636: I/Corona(24139): } 02-12 18:52:33.636: I/Corona(24139): appodeal cached interstitial 02-12 18:52:41.416: I/Corona(24139): Event response: { 02-12 18:52:41.416: I/Corona(24139): "name":"adsRequest", 02-12 18:52:41.416: I/Corona(24139): "phase":"displayed", 02-12 18:52:41.416: I/Corona(24139): "provider":"appodeal", 02-12 18:52:41.416: I/Corona(24139): "type":"interstitial", 02-12 18:52:41.416: I/Corona(24139): "isError":false 02-12 18:52:41.416: I/Corona(24139): } 02-12 18:52:41.416: I/Corona(24139): Event response: { 02-12 18:52:41.416: I/Corona(24139): "name":"adsRequest", 02-12 18:52:41.416: I/Corona(24139): "phase":"closed", 02-12 18:52:41.416: I/Corona(24139): "provider":"appodeal", 02-12 18:52:41.416: I/Corona(24139): "type":"interstitial", 02-12 18:52:41.416: I/Corona(24139): "isError":false 02-12 18:52:41.416: I/Corona(24139): } 02-12 18:52:41.416: I/Corona(24139): appodeal closed

Yeah, as I’ve already said, I must agree with agramonte on this - I don’t have any issues either, sadly.

This is what we’ll do next: can you submit a bug at https://portal.coronalabs.com/bug-submission ? Make sure to include a sample to reproduce an issue (this is really important and solves the issue by itself, like, half of the time ;) ) and describe in detail what exactly is wrong. I’m sure that we’ll figure everything out quick.