OK i have implemented adbuddiz video reward system. In my app, I have 2 buttons for different functions and I want the user to click each buttons, watch video and earn credits per buttons
Right now I have done for one but stuck as to how to make it for the second button since the event listerner is just one listerning to all video events:
local function listenerRewardedVideo( event ) if event.value == "didFetch" then print( "didFetch" ) end if event.value == "didComplete" then print( "didComplete" ) -- Reward user here savecount = savecount + 1 Lib.setSaveValue("savecount", savecount, true); myData.label\_saveme.text = tostring( savecount ) -- local alert = native.showAlert("Successful","Count saved successfully!", {"OK"}) end if event.value == "didNotComplete" then print( "didNotComplete" ) end if event.value == "didFail" then print( "didFail - " .. event.detail ) end end Runtime:addEventListener( "AdBuddizRewardedVideoEvent", listenerRewardedVideo )
So wondering how to have separate listener to perform separate actions.