Integrate with Enhance - Defold
Offer Walls
Offer Walls show full screen of real world offers (e.g. surveys), usually with an in-game reward offered in return for a completion.
Example Usage
function init(self) enhance.setReceivedCurrencyCallback(on_currency_received) end function on_currency_received(self, amount) write_log("Currency received: " .. amount) end function showOfferwall() if enhance.isOfferwallReady() then enhance.showOfferwall() end end
Methods
enhance.setReceivedCurrencyCallback
nil enhance.setReceivedCurrencyCallback(
function onCurrencyReceivedCallback
)
Parameters:
function onCurrencyReceivedCallback
- The offer wall callback. As a parameter, will receive an amount
of the granted currency as an integer.
enhance.isOfferwallReady
boolean enhance.isOfferwallReady(
optional string placement = "default"
)
Parameters:
optional string placement
- Specifies the internal placement of the ad (from the Enhance mediation editor).
Return Value:
Returns true
if any offer wall is ready, false
otherwise. When app is not Enhanced, always returns true
.
enhance.showOfferwall
nil enhance.showOfferwall(
optional string placement = "default"
)
Parameters:
optional string placement
- Specifies the internal placement of the ad (from the Enhance mediation editor).