You can put it up on open beta and I can download it and see what happens. Not sure it is going to work on a Kindle. My guess is no.
That’s what I thought about the kindle. But that beta idea is a good one. But I don’t need to do that. I’ve got mine on mediafire. If you want I could just send the link
Sure send me a link. I’ll try it out on my device.
https://www.mediafire.com/file/0vfffac2lanhiff/Ninja_Wall_Dash.apk/file
The video ads should pop up when your press the home button(the pause screen one and the end game one) while in game.
For the reward video, its in the shop. It’s the home button in the bottom-right (I haven’t made a custom button for it yet).
Thanks
I retested this morning and clicked on the right home button. No reward ads. Are you sure you are calling:
startapp.load( "rewardedVideo" )
I checked the logs and all I see is this:
Just checked, I was using [lua] startapp.load("rewardVideo) [/lua] My bad.
Here’s the link to the fixed build: http://www.mediafire.com/file/rh4swgqhle6mqq9/Ninja_Wall_Dash.apk/file
Also I moved the reward ad button to the buy screen, and I gave it it’s own button.
Works perfectly. Here are the event signatures when completed:
Yay, thanks
Also how do I use reward videos? And how do I use it so it will work with interstitial and video ads?
Wow those are a lot of questions and you have to give people time to response before nudging especially at the time of your question and your nudge.
But anyway:.
-
Search for the forums, I believe @romaminggamer has some information on how to appropriately deal with ads.
-
Do you have a newer device you can test with? 4.0.4 is very old, I would look for something with at least 4.3
-
Post your code and the logs so we can have a better idea of what is going wrong.
Nudge?
And ok, I’ll check him out.
And no. That’s pretty much the only android device I have.
Also I will post my code here if that will help.
Sorry about the time of my posting, it was day here. Though I am aware of the different time zones.
Thanks
centerX = display.contentCenterX
centerY = display.contentCenterY
_W = display.contentWidth
_H = display.contentHeight
local composer = require( “composer” )
loadsave = require(“lib.loadsave”)
magnet = require ( “lib.magnet” )
startapp = require( “plugin.startapp” )
local function adListener( event )
if ( event.phase == “init” ) then – Successful initialization
print( event.provider )
– Load an StartApp ad
startapp.load( “interstitial” )
--tartapp.load( “video” )
elseif ( event.phase == “loaded” ) then – The ad was successfully loaded
print( event.type )
elseif ( event.phase == “failed” ) then – The ad failed to load
print( event.type )
print( event.isError )
print( event.response )
elseif ( event.phase == “displayed” ) then – The ad was displayed/played
print( event.type )
elseif ( event.phase == “hidden” ) then – The ad was closed/hidden
print( event.type )
elseif ( event.phase == “clicked” ) then – The ad was clicked/tapped
print( event.type )
elseif ( event.phase == “reward” ) then – Rewarded video ad playback completed
print( event.type )
end
end
– Initialize the StartApp plugin
startapp.init( adListener, { appId="", enableReturnAds = true } )
– Hide status bar
display.setStatusBar( display.HiddenStatusBar )
– Seed the random number generator
math.randomseed( os.time() )
–audio.reserveChannels( 1 )
–audio.setVolume( 0.1, { channel=1 } )
coinSnd = audio.loadSound(“sounds/moneyPickup.wav”)
cashRegSnd = audio.loadSound(“sounds/cashRegister.wav”)
jumpSnd = audio.loadSound(“sounds/whoosh.wav”)
clickSnd = audio.loadSound(“sounds/buttonClick.wav”)
hurtSnd = audio.loadSound(“sounds/hurt.wav”)
–bgMusic = audio.loadStream(“sounds/ninjaWall.wav”)
audio.setVolume( 0.9, {channel = 2} )
audio.setVolume( 1, {channel = 3} )
–setup save file for user
user = loadsave.loadTable(“user.json”)
–user = nil
if(user == nil) then
user = {}
user.money = 0
user.highscore = 0
user.playsound = true
user.skin = “ninja”
user.whiteNinja = false
user.girlNinja = false
user.lizardMan = false
user.robot = false
user.worker = false
user.chef = false
loadsave.saveTable(user, “user.json”)
end
– Go to the menu screen
composer.gotoScene( “menu” )
my main.lua /\
startapp.show(“interstitial”)
This is how I show my ad /\
-
To load rewarded you need to do the same as you are doing with interstitial. You can put it right under the request to load the interstitial, but it is usually better to load it closer to the event where the user will have an opportunity for a reward.
startapp.load( “rewardedVideo” )
-
Then where you want to show it, check to see if it is loaded and show your reward dialog (basically asking the user if they want to watch a video for a reward of xxxx).
if startapp.isLoaded( “rewardedVideo” ) then – Show your reward dialog. end
-
If the user says yes then show it:
startapp.show( “rewardedVideo” )
-
Once you get the event.phase = reward call back give the user what you offered for a reward:
elseif ( event.phase == “reward” ) then – Rewarded video ad playback completed --give user reward end
-
Remember to load the next reward ad when appropriate or when the last ad is closed.
Hopefully, this response helps you a little.
Ok, thanks. This will help. I’ll give it a try. Just one question. After I show the ad, do I call the adListener function for the “elseif (event.phase == “reward”), or do I write a new if statement?
You already have the “reward” statement. You don’t need to write another one. When they finish viewing the video it will just land there so that you can give them the reward.
Ooooh, ok. Thanks.
Do startapp video based ads not work on older devices? Because while interstitial ads work just fine the video based ads don’t show.
Rewarded videos or plain interstitial video ads? At least in my experience, the native sdk and the corona sdk does not currently support calling non-rewarded video ads directly. When you ask for an interstitial you will get a mix of static and video ads. I think the documentation should be updated to remove the reference to video ads.
From their documentation about interstitial:
When integrating this ad type you are open to get both Display or Video ads. Our optimization will auto-select the ad type that will generate the most revenue for you.