在phonegap Android应用程序上显示leadbolt广告
我一直在尝试让 Leadbolt 广告显示在我使用 PhoneGap 创建的 Android 应用程序上,但没有成功。这就是我到目前为止所做的:
- 我在 Leadbolt.com 上创建了一个通知广告,添加了对项目 libs 文件夹中包含的 LeadboltController.jar 和 LeadboltPhonegapPlugin.jar 文件的引用。
将下面的代码添加到我的 javascript 文件
var Leadbolt = function() { } Leadbolt.prototype.load = function(data, successCallback, failureCallback) { return PhoneGap.exec(successCallback, failureCallback, 'LeadboltPlugin', data[0], data);
};
PhoneGap.addConstructor(function() { PhoneGap.addPlugin('leadbolt', new Leadbolt()); PluginManager.addService("LeadboltPlugin", "com.LeadboltPlugin.LeadboltPlugin");
});
有时我会在 javascript 文件或 index.html 中插入下面的代码,无论哪种方式我都看不到广告。
window.plugins.leadbolt.load(["*********"], null, null);
我确信人们一定已经让它在他们的应用程序上运行了。我非常感谢所提供的任何帮助。
多谢。
I’ve been trying without success to get leadbolt ads to show up on an android app I created using phonegap. This is what I’ve done so far:
- I have created a notification ad on leadbolt.com, added references to LeadboltController.jar and LeadboltPhonegapPlugin.jar files contained in my projects libs folder.
Added the code below to my javascript file
var Leadbolt = function() { } Leadbolt.prototype.load = function(data, successCallback, failureCallback) { return PhoneGap.exec(successCallback, failureCallback, 'LeadboltPlugin', data[0], data);
};
PhoneGap.addConstructor(function() { PhoneGap.addPlugin('leadbolt', new Leadbolt()); PluginManager.addService("LeadboltPlugin", "com.LeadboltPlugin.LeadboltPlugin");
});
Sometimes I insert the code below in my javascript file or index.html, either way I see no ads.
window.plugins.leadbolt.load(["*********"], null, null);
Am sure people must have gotten this to work on their apps. I would really appreciate any assistance offered.
Thanks alot.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否已这样做:
打开/res/xml/plugins.xml,添加以下行:
Have you done this:
Open /res/xml/plugins.xml, add following lines:
嘿,不确定这是否有帮助,但我知道 Leadbolt 发布了其phonegap 插件的更新,并且可以在门户中使用。他们将所有广告类型放在一个插件中,使用起来更加方便。你尝试过吗?
如果仍然无法正常工作,您应该写信给他们的支持人员并提供详细信息,他们将为您提供答复。我已经这样做了,而且非常有帮助。
Hey not sure if this helps, but I know Leadbolt released an update to their phonegap plugin and its available in the portal. They put all ads types in one plugin which is much more convenient to use. Have you tried that?
If still not working, you should write to their support with details and they will get an answer for you. I’ve done that and its been very helpful.