【发布时间】:2014-10-25 02:54:46
【问题描述】:
我的问题很容易理解。在开发我的游戏(在 Corona SDK 中)时,我遵循了在其中实施 AdMob v2 广告所需的所有步骤,当然我将函数 ads.show() 的 testMode 参数设置为 true 以测试应用程序。在测试期间,所有横幅都按预期显示,插页式广告也是如此。但是,当我将 testMode 设置为 false 时,横幅不再显示。插页式广告继续正常工作,问题仅出在横幅上。
不幸的是我不知道如何使用模拟器(虽然我已经阅读了很多关于这个的文章),所以我必须在真实设备上测试我的应用程序,所以我无法观看 print() 函数看看发生了什么,但我在main.lua 文件上使用以下代码创建了一个测试项目:
local ads = require("ads")
local t
local appID = "ca-app-pub-xxxxx/xxxxx"
local function adListener(event)
local msg = evento.response
if event.phase == "loaded" then
end
if event.isError then
end
end
ads.init("admob", appID, adListener)
background = display.newImage("Images/background.png", 0, 0)
local function showBanner()
ads.show("banner", {x = 0, y = display.contentHeight/2, appID = "ca-app-pub-xxxxx/xxxxx", testMode = false})
end
t = timer.performWithDelay(4000, showBanner, 1)
这里的背景无关紧要。在这个应用程序中,我使用了与我的游戏横幅相同的 appID,并且横幅确实出现在屏幕上。我想知道我的问题是否与 Composer API 有关。一项可能很重要的信息是我尚未将我的游戏注册(上传)到 Play 商店。
如果我没有重新搜索,我不会问这个问题。我在这个链接中找到了一个有类似问题的人:http://forums.coronalabs.com/topic/50586-admob-banner-not-showing/
这个问题似乎还没有具体的解决方案。有人可以帮我吗?
【问题讨论】:
标签: android lua admob coronasdk