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