Gideros Integration Guide

Introduction

Kiip can be used directly within your Gideros implementation using the Ads plugin within Gideros Studio.

Integration

Kiip support is available for Gideros Mobile since version 2017.3. To enable Kiip, enable the Gideros Ads plugin in export dialog, then tick ‘Enable Kiip support’ checkbox. Supply Kiip App Keys (found in the Kiip Dashboard) for your target platforms, and that’s all.

Usage

Kiip moments are managed through Gideros generic Ads API. Create an Ads instance for Kiip with the folowing code:

require "ads"
ads = Ads.new("kiip")
ads:setKey("<secret key>") -- replace with your app's secret key

Use your Kiip moment name as the ‘ad type’ parameter in further calls to the Ads API.

Example code:

require "ads"

ads = Ads.new("kiip")
ads:setKey("<secret key>") -- replace with your app's secret key
ads:enableTesting() -- Required for test mode, remove this for production

ads:addEventListener(Event.AD_DISPLAYED, function()
print("ads AD_DISPLAYED")
end)

ads:addEventListener(Event.AD_RECEIVED, function()
print("ads AD_RECEIVED")
end)

ads:addEventListener(Event.AD_FAILED, function(e)
print("ads AD_FAILED", e.error)
end)

ads:addEventListener(Event.AD_ACTION_BEGIN, function()
print("ads AD_ACTION_BEGIN")
end)

ads:addEventListener(Event.AD_ACTION_END, function()
print("ads AD_ACTION_END")
end)

ads:addEventListener(Event.AD_DISMISSED, function()
print("ads AD_DISMISSED")
end)

ads:addEventListener(Event.AD_ERROR, function(e)
print("ads AD_ERROR", e.error)
end)

ads:addEventListener(Event.AD_REWARDED, function(e)
print("ads AD_REWARDED",e.amount)
end)

local function onVideo(btn, event)
if btn:hitTestPoint(event.x, event.y)then
ads:showAd("interstitial") -- Use your kiip moment name here
end
end

video = TextField.new(nil, "VIDEO")
video:addEventListener(Event.MOUSE_DOWN, onVideo, video)
video:setScale(5, 5)
video:setPosition(10, 200)
stage:addChild(video)

Need Help?

We’re happy to answer any questions about integrating Kiip. Check out our FAQ or email us.