Hello everyone
My problem is this, I’m trying to insert publicity into my app with appodeal.
To get started I downloaded the sample code and changed the app key. Everything works but I can not figure out where to put the code for the video reward. I searched around and tells me to put that into the “playbackEnded” phase of the method used in appodeal.init().
To handle this I did something like that:
local txt\_info = display.newText( "nil text", 20, 200, "gameFont", 25 ) txt\_info.anchorX = 0 local txt\_info2 = display.newText( "nil text", 20, 250, "gameFont", 25 ) txt\_info2.anchorX = 0 local txt\_info3 = display.newText( "nil text", 20, 300, "gameFont", 25 ) txt\_info3.anchorX = 0 -- Ad listener function local function appodealListener( event ) txt\_info.text = "Event:"..event.phase..event.type..event.data -- Exit function if user hasn't set up testing parameters if ( setupComplete == false ) then return end -- Successful initialization of the Appodeal plugin if ( event.phase == "init" ) then print( "Appodeal event: initialization successful" ) -- An ad loaded successfully elseif ( event.phase == "loaded" ) then print( "Appodeal event: " .. tostring(event.type) .. " ad loaded successfully" ) -- The ad was displayed/played elseif ( event.phase == "displayed" or event.phase == "playbackBegan" ) then print( "Appodeal event: " .. tostring(event.type) .. " ad displayed" ) -- The ad was closed/hidden/completed elseif ( event.phase == "hidden" or event.phase == "closed" or event.phase == "playbackEnded" ) then print( "Appodeal event: " .. tostring(event.type) .. " ad closed/hidden/completed" ) -- The user clicked/tapped an ad elseif ( event.phase == "clicked" ) then print( "Appodeal event: " .. tostring(event.type) .. " ad clicked/tapped" ) -- The ad failed to load elseif ( event.phase == "failed" ) then print( "Appodeal event: " .. tostring(event.type) .. " ad failed to load" ) elseif( event.phase == "playbackBegan") then txt\_info2.text = "Start Video"..tostring( os.time( ) ) elseif( event.phase == "playbackEnded") then txt\_info3.text = "Finish Video"..tostring( os.time( ) ) end end
Although everything works, the texts do not change at all, so I think they are not getting into the method. Probaiblemte I’m wrong. can you help me?