appodeal : sdk version pb ?

Hi,

I use the last version of corona SDK :

Build: 2017.3068

i used too appodeal to launch rewarded video when a user want to earn a life after he falls to 0 life.

When i load appodeal.init (once and only once)… on the console i can read :

" plugin.appodeal : 1.2.1"

"your SDK version 1.3.6 does not match latest SDK version 1.3.9 !"

" ADCOLONY 2.6.2.1"

and in my adlistener function i check the “failed” event  :

function adListener( event )     if event.phase == "failed" then        native.showAlert( "sorry", "no video", { "OK" }, function() end )      end end  

The problem si that, every minute, the native.showAlert appears on screen !

So Appodeal try to load a video in the background, doesn’t success, and then the “failed” event is executed… and it try again to load, and failed, and try again, and so on…

@latyl1

You’ll need to remove the call to native.showAlert() from your event listener. When the Appodeal SDK fails to load an ad, the SDK will automatically try to load a new ad at regular intervals until it succeeds.

If you want to check if an ad is available, you can use appodeal.isLoaded(“rewardedVideo”) before showing the ad.

Thanks Do you know what are these 2 sdk and how to repair this problem : “your SDK version 1.3.6 does not match latest SDK version 1.3.9 !” With appodeal, is it the correct way to first preload (load function) a video in the init event, and then launch again the load function in the “videobegan” event, so a second video will precharge while the first one is being read?

You can ignore the version warning. The current Appodeal plugin uses Appodeal SDK version 1.3.6 and it will work just fine.

Appodeal will soon release a new SDK version, and we will update the plugin at that time.

You do not need to call appodeal.load(). The Appodeal SDK will automatically load ads for you by default.

You can check if an ad is available by calling appodeal.isLoaded().

I know that appodeal loads ads by default, but i changed this parameter because i don’t want appodeal try again and again to load ads in background if not need. So i load the first video in the init event.

My question : is it a good way to launch the load function in the “videobegan” event so a second video will be preload while the first one is seing (and so on), so when the first one is finish user can watch the second one.

So : is it possible to load a new video while a first video is being read ?

Yes, you can call appodeal.load() when you receive the “playbackBegan” event (assuming you have set autoCacheAds=false during init()).

It’s still recommended that you let the SDK do the loading. There is no guarantee that a new ad will be loaded when you call appodeal.load(). If an ad fails to load, you will need to remember to call load() in your own code until an ad is available.

By default the Appodeal SDK will try to load ads for “banner”, “interstitial”, “video” and “rewardedVideo”. If you are only interested in “rewardedVideo” you can add supportedAdTypes={“rewardedVideo”} as an option to init(). This way you can restrict the type of ads the Appodeal SDK will try to load.

Also, when checking for event.phase == “failed” you should also check for event.type to see what type of ad has failed.

@latyl1

You’ll need to remove the call to native.showAlert() from your event listener. When the Appodeal SDK fails to load an ad, the SDK will automatically try to load a new ad at regular intervals until it succeeds.

If you want to check if an ad is available, you can use appodeal.isLoaded(“rewardedVideo”) before showing the ad.

Thanks Do you know what are these 2 sdk and how to repair this problem : “your SDK version 1.3.6 does not match latest SDK version 1.3.9 !” With appodeal, is it the correct way to first preload (load function) a video in the init event, and then launch again the load function in the “videobegan” event, so a second video will precharge while the first one is being read?

You can ignore the version warning. The current Appodeal plugin uses Appodeal SDK version 1.3.6 and it will work just fine.

Appodeal will soon release a new SDK version, and we will update the plugin at that time.

You do not need to call appodeal.load(). The Appodeal SDK will automatically load ads for you by default.

You can check if an ad is available by calling appodeal.isLoaded().

I know that appodeal loads ads by default, but i changed this parameter because i don’t want appodeal try again and again to load ads in background if not need. So i load the first video in the init event.

My question : is it a good way to launch the load function in the “videobegan” event so a second video will be preload while the first one is seing (and so on), so when the first one is finish user can watch the second one.

So : is it possible to load a new video while a first video is being read ?

Yes, you can call appodeal.load() when you receive the “playbackBegan” event (assuming you have set autoCacheAds=false during init()).

It’s still recommended that you let the SDK do the loading. There is no guarantee that a new ad will be loaded when you call appodeal.load(). If an ad fails to load, you will need to remember to call load() in your own code until an ad is available.

By default the Appodeal SDK will try to load ads for “banner”, “interstitial”, “video” and “rewardedVideo”. If you are only interested in “rewardedVideo” you can add supportedAdTypes={“rewardedVideo”} as an option to init(). This way you can restrict the type of ads the Appodeal SDK will try to load.

Also, when checking for event.phase == “failed” you should also check for event.type to see what type of ad has failed.