Questions about appodeal

I’ve been reading through the corona docs for how to implement appodeal into my game.

I have added all the required lines into my build.settings file

I am now looking at the page here: docs.coronalabs.com/plugin/appodeal/index.html

Under syntax it mentions 

local appodeal = require( "plugin.appodeal" )

I am wondering, do I just add the line in my main.lua file once and i’m set to use all the function calls

or do I need to include this in every .lua file that I would plan to show ads in?

I’m not sure, but I am under the impression that anything required in the main.lua file carries over to all other .lua files in the project, but I am probably wrong.

Thanks

You need to require it anywhere you want to access fields and functions in the library/module.

Thanks for the info

I was also wondering… appodeal.show() has the option for reward videos.

is there a list of the event.phases that can be used in my code?

I see that there is an init and failed phase, but in order to give the reward for the video I would assume there is a “completed” phase so that I could give the player their in game reward for completing the video.

https://docs.coronalabs.com/plugin/appodeal/event/adsRequest/phase.html

Rob

Thanks all for the info, I think I have one final question.

referring to the event.phases that Rob pointed out.

I want to have rewarded videos and obviously give the player the option to play the video.

What phase means that an ad is ready to go, but not yet playing on the device for the user to see. I would assume it would be between “init” and or “loaded”

My own common sense leans towards “loaded” as an ad that is ready in the background for the user to select to play.

I don’t think there is such a state/indicator.  

You’ll probably have to keep track of whether you’ve tried to play the ad or not on your own, I do believe.

well, I noticed that there is an option for rewarded videos.

In my experience as a user, rewarded videos do not just play as soon as the ad network has one ready. The app gives you some kind of indication that the video is available to watch and it gives the user the option to view or not.

like a bullet in a gun.

the ad network loads the gun and tells the user they can pull the trigger if they please.

It is then up to us to indicate to the user “the bullet is in the gun, what do you want to do” therefore there has to be some phase that would indicate “I’m ready, let the user know i’m here so they can decide what to do”

The developer decides when to show the user a text and button that a rewarded video is available. The developer can show it once they know the video is loaded, or they can pre-load the video and having it ready until a point where the developer wants to allow an interruption in the app convenient to show the ad.

Rob

You need to require it anywhere you want to access fields and functions in the library/module.

Thanks for the info

I was also wondering… appodeal.show() has the option for reward videos.

is there a list of the event.phases that can be used in my code?

I see that there is an init and failed phase, but in order to give the reward for the video I would assume there is a “completed” phase so that I could give the player their in game reward for completing the video.

https://docs.coronalabs.com/plugin/appodeal/event/adsRequest/phase.html

Rob

Thanks all for the info, I think I have one final question.

referring to the event.phases that Rob pointed out.

I want to have rewarded videos and obviously give the player the option to play the video.

What phase means that an ad is ready to go, but not yet playing on the device for the user to see. I would assume it would be between “init” and or “loaded”

My own common sense leans towards “loaded” as an ad that is ready in the background for the user to select to play.

I don’t think there is such a state/indicator.  

You’ll probably have to keep track of whether you’ve tried to play the ad or not on your own, I do believe.

well, I noticed that there is an option for rewarded videos.

In my experience as a user, rewarded videos do not just play as soon as the ad network has one ready. The app gives you some kind of indication that the video is available to watch and it gives the user the option to view or not.

like a bullet in a gun.

the ad network loads the gun and tells the user they can pull the trigger if they please.

It is then up to us to indicate to the user “the bullet is in the gun, what do you want to do” therefore there has to be some phase that would indicate “I’m ready, let the user know i’m here so they can decide what to do”

The developer decides when to show the user a text and button that a rewarded video is available. The developer can show it once they know the video is loaded, or they can pre-load the video and having it ready until a point where the developer wants to allow an interruption in the app convenient to show the ad.

Rob