![]() |
IOS admob plugin screen |
最近手機平台發生了很多事
IOS 2013/05/01起不再支持UDID的APP上架
Corona Widget 出了2.0版
小島身為深深的受害者之一
光改了widget 1.0 -> 2.0就花了快一週
重點是。。還是很多Bug
最後 放棄,直接使用回widget 1.0的 opensource
扯遠了
這次是要講大躍進!
Corona 終於直接支援admob 的Plugin了!!(需使用最新的daily sdk)
不像之前的admediator ,使用的是web 連結來呈現admob ad
而且很多廣告無法點擊...殘念
所謂的plugin 就是編譯後會根據平台使用native SDK來呈現
所以 再也不用擔心違法被封帳的問題!
從二三年前,就有人在要求admob 官方支援了,但遲遲沒有消息......還遲了很久
這次,終於不再黃牛了!!
首先需要告訴Corona 要使用plugin
首次使用將會自動從Server 端下載 admob 的 plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins = | |
{ | |
-- key is the name passed to Lua's 'require()' | |
["CoronaProvider.ads.admob"] = | |
{ | |
-- required | |
publisherId = "com.coronalabs", | |
}, | |
}, |
接著在程式裡加上這段
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ads = require "ads" | |
local function adListener(event) | |
-- 當要求到廣告時會呼叫這裡 | |
end | |
-- 以下a14f8ef7162ae18為小島的APPID,請置換成你的 | |
-- 如果沒有,也可以直接用這個測試,錢就算我的:D | |
--ads.init( "admob", apid, adListener ) | |
ads.init( "admob", "a14f8ef7162ae18", adListener ) | |
ads.show( "banner", { x=0, y=0 } ) |
請各位客倌自行調校吧
![]() |
android admob plugin screen |
![]() |
android admob click screen |
![]() |
小島親自測試的,有錢進來囉 |
沒有留言:
張貼留言