[Appodeal] Loaded ads not showing or with huge delay

Hey guys!

Some inside info:

We decided to skip 2.2.0 due to some serious issues. For now we are working with 2.3.0 beta  Appodeal SDK and it seems that everything working fine finally.

We plan to finish QA process till the end of this week. Then new Corona Appodeal plugin beta  will be public, which will include 2.3.0  beta  Appodeal SDK, which in it’s turn introduces a lot of performance fixes, so everything should be working fine.

When 2.3.0 Appodeal SDK will be released and we will be sure that everything is working fine, we will make a new public release.

I have a question.

I am currently addressing issues where Appodeal’s ads may not play properly.

appodeal.canShow ()

I can not use this function, how do I install a new plugin?

I am using this version now.

Corona SDK: 3276

plugin.appodeal: 1.4.2 (SDK: 2.1.9)

Hi GoG,

Can you provide us a code snippet of how you are using Appodeal plugin? Event better if you include a stack trace or maybe a test case (.apk).

Cheers!

Hi,

We were in a rush, some new methods from beta release are went to Appodeal’s docs for stable release. You will be able to use this method in new beta release, which will be available in a couple days.

I’ll write a note about it on docs, thanks for noticing it!

Hi Karpovpw,

Thanks for your quick follow up.

You can find my code using Appodeal plugin below (quite straightforward).

You can also find my game in open beta for Android here for test:

https://play.google.com/store/apps/details?id=com.busybreaks.switchero

Note: interstitial ads appear on player death every 5 minutes or so

and reward video is offered on each level end boss to restart battle if player is defeated.

[lua]

M.init = function()

    – Initialize the Appodeal plugin

    appodeal.init( M.appodealListener,

        { appKey=myAppKey,

          supportedAdTypes={“interstitial”, “rewardedVideo”},

          testMode=false } )

end

M.show = function( type )

    – SHOW

    if ( type == “interstitial” ) then

        if ( appodeal.isLoaded(“interstitial”) ) then

            appodeal.show( “interstitial” )

        end

    else

        if ( appodeal.isLoaded(“rewardedVideo”) ) then

            appodeal.show( “rewardedVideo” )

        else

            noRewardVideoAvailablePopup()

        end

    end

end

M.appodealListener = function( event )

    – Appodeal

    local phase = event.phase

    – INIT

    if (phase == “init”) then

        appodeal.setUserDetails( { userId=myData.settings.userUID } )

    – R.VIDEO ENDED

    elseif (phase == “playbackEnded” and event.type == “rewardedVideo”) then

            composer.hideOverlay()

            M.gameScene:onRetry()

    – CLOSED

    elseif (phase == “closed”) then

        – R.video

        if (event.type == “rewardedVideo”) then

            M.gameScene:onResume()

        – Interstitial

        else

            M.gameScene:onDeathMenu()

        end

    end

end

[/lua]

As you can see, I check if ads are loaded before showing and I even display a special popup if no r.video is available.

When the issue occurs (i.e. ad not showing or with huge delay), in the case of r.video the popup don’t show which means

a video is indeed loaded…

Note: in a different use case, if I wait for ads to load and then activate plane mode on my device (i.e. disable network),

I still have ‘isLoaded == true’ but calling ‘show’ doesn’t do anything…

If you need more details or info, please let me know.

PS: I don’t have stack trace available as the conditions to reproduce the bug are quite difficult to replicate for me now

Thank you.

understood.

I expect it :slight_smile:

Hi GoG,

When and how do you call your show() method? That’s the interesting part.
 

We can definitely solve your problem (since we haven’t heard of this problems from other Corona/Appodeal users, we may assume that it’s unique). To work with you more closely, can you fill up this form https://portal.coronalabs.com/bug-submission? Don’t forget to pin sample code, as I think that we can find the issue pretty quickly, if we can see it.

If your sample code is more than 8MB, you can just send a letter with sample attached to support@coronalabs.com.

Thanks in advance!

@Karpovpw,

I’m not sure what you mean by ‘when and how’ I call the method but I’ll try to describe the in-game context.

The core loop looks something like that for interstitial:

  • User start level

  • Play level until end or player death

  • On death, if ~5 min elapsed (since level start) then the game is paused and I call ‘show(“interstitial”)’ + reset timer

  • Then level restart

For reward video, as I said, the user can press a button (one-time) if defeated by end level boss.

On button press, I call ‘show(“rewardVideo”)’.

Note: the loop works great with normal network access.

If I take a guess, what I think is happening is related to intermittent network connectivity.

Basically, the ads are loaded when network is up but the ‘show()’ method can be called when connection is temporary down.

As I mentioned, the ‘isLoaded()’ method still return ‘true’ but ‘show()’ doesn’t do anything while network is inaccessible.

When connectivity return, the ad may start playing, expect it is way too late.

The user, tired of waiting for 10+ seconds, already exited the game level or menu showing the ad (as ‘show’ can’t be canceled).

For him then, it just seems like an ad popped up randomly, which is as bad as it sounds (the video without the reward)…

What I understand is that ad need network access to load (obviously) but also to be played.

Problem is the Appodeal API doesn’t provide a way to check if ad can be played after being loaded.

-> You can reproduce this by activating plane mode on device after ad are loaded…

Note: I added a ‘loading ad overlay’ in the next version of my app to help user understand something is happening

and they might need to wait a little bit (instead of an app that looks like it crashed/freezed).

This will also help to avoid player pressing the ad button multiple time if nothing happen in the next few seconds (for reward video).

Please advice how to handle this use case !

Regards

Hi Karpovpw,

I will submit a bug report, no problem.

In the meantime, could you explain why do you think this bug is unique to my case ?

The guidelines I provided to reproduce the bug seems quite universal to me…

Could you check on your side if you see it too ?

FYI: I’m using Corona SDK ‘2017.3160’, with Appodeal plugin ‘2017.3068’

Thanks for your quick reply

Bug submitted with information I collected so far

(no full app code as I can’t share my all my sources

and I already share the binary from Play Store)

Hope this will help you reproduce and fix the bug quickly

PS: I will also keep writing on this forum thread as I want everybody to be aware of Appodeal SDK limitations

before making the choice to integrate it in their app

Thanks for your submission, GoG.
We can actually reproduce this bug with your guideline.

I’ve personally handed over this issue to the Appodeal team.

Your detailed description about airplane mode actually really helped in investigation, thanks one more time!

Ok, I have official Appodeal response with docs reference:

NOTE: SDK can’t show ads in offline mode! You will get callback ‘failToPresent’ if you call ‘showAd’ without internet connection’

https://www.appodeal.com/sdk/documentation?framework=20&full=1&integration=1&platform=4#p_3_5

It’s our fault that our docs doesn’t include this important information, we will update it ASAP to avoid misunderstanding in future.

To avoid your particular problem, you should use “failed” phase in listener to catch this callback.

Once again, thank you for your feedback!

Hello Karpovpw,

Once again, thank you for your quick answer.

I will double check to see if a ‘failed’ event is fired when calling ‘show()’ without network access.

In this case, I will be able to handle the situation so my game won’t block players with bad internet connection.

Thanks you for adding this information into the plugin doc.

I’m sure others developers will appreciate :slight_smile:

Regards

Hi again @Karpovpw,

I just tested your solution and it doesn’t work : no ‘failed’ event is received by the appodeal listener.

This is all I have in the stack after the test steps (load -> airplane mode -> show) for both interstitial and r.video:

----------------------------

Provider: appodeal

Phase: init

----------------------------

Provider: appodeal

Phase: loaded

Type: interstitial

----------------------------

Provider: appodeal

Phase: loaded

Type: rewardedVideo

----------------------------

Provider: appodeal

Phase: displayed

Type: interstitial

----------------------------

Provider: appodeal

Phase: loaded

Type: interstitial

----------------------------

Provider: appodeal

Phase: closed

Type: interstitial

----------------------------

AIRPLANE MODE ACTIVATED

Did you test it yourself ?

I expected a valid solution here, I already spent a lot of time working around Appodeal SDK bugs…

I’ve just checked below docs.

https://docs.coronalabs.com/plugin/appodeal/canShow.html

and docs says “Revision 2018.3278”

but do not work “canShow” function with 3278 build.

How can I get the last version of appodeal SDK?

Regards

Hi,

Take a look at big important note in the description, quoting: 
 

This method is not supported by stable modular & legacy plugin versions for now. Make sure to use new modular plugin beta to get the latest and greatest.

This beta version will be available public in a couple days, as stated two posts above yours.

Hi GoG,

Sorry for inconvenience, but after investigating more of this issue with Appodeal team it seems that Android Appodeal SDK doesn’t support this callback and they are working on it right now.

Since our plugin is cross-platform, we have directions to disable this callback until next release 2.2.0, which soon will be available.

We will update our plugin to include Android callback as soon as Appodeal SDK release 2.2.0 will become available and we will update our docs accordingly.

That’s a really unpleasant situation for us, but cross-platform solution always imposes certain limitations. But with help of users appeals, like yours, the process of improvement are accelerates fast and I thank you one more time for this and for your patience.

Hello Karpovpw,

Thanks for the good news.

Sorry if I came a little strong in my comments.

The situation can be a bit stressful for me as I’m finally in the release process of my app.

Nevertheless, I appreciate your feedback and the dedication of the Appodeal team to fix this bug.

I used to work in cross-platform environment too, so I know the hurdle.

I’ll be sure to test it on iOS as well so I can at least handle the use case on this platform.

Note: could you update the doc accordingly for others developers in the meantime ?

Regarding Appodeal SDK 2.2.0, do you have a approximate release date you can share with us ?

WIll it be in the next few weeks, months, next year ?

Do you know if a fix for the “Android home button bypass” will be included too ?

https://forums.coronalabs.com/topic/69886-issue-with-appodeal-reward-video-listener-android-home-button/

Thanks for the quick follow-up

As a fellow developer I understand your situation very well. That’s why I’m really sorry about all this.

Because of the cross-platform structure, we can not enable this callback on iOS, even if it is available, if it’s unavailable on Android. It’s really annoying for me personally, but that’s how it’s done.

As an inside info, 2.2.0 will be available pretty soon. It proceeds to internal testing stage and soon will become available for everyone (and I can guarantee that Corona Labs will get release version in the first flight for sure, even before official release, but you didn’t hear it from me, guys ;) ). So, 2-3 weeks is my estimate time for our update.

Fix for mentioned thread about home button is also at work and must be included in this new big update for Appodeal plugin. And of course, all docs will be updated for the new release.

Corona Appodeal plugin beta just went live!

Take a closer look at https://docs.coronalabs.com/plugin/appodeal/ to learn more.