在PhoneGap的Andr​​oid应用显示leadbolt广告 [英] Displaying leadbolt ads on a phonegap android app

查看:241
本文介绍了在PhoneGap的Andr​​oid应用显示leadbolt广告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直没有成功获得leadbolt广告出现在Android应用程序使用我创建的PhoneGap。这是我迄今所做的:

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:


  1. 我建立了leadbolt.com通知广告,添加引用包含在我的项目libs文件夹LeadboltController.jar和LeadboltPhonegapPlugin.jar文件。

  2. 添加下面的code到我的JavaScript文件

  1. I have created a notification ad on leadbolt.com, added references to LeadboltController.jar and LeadboltPhonegapPlugin.jar files contained in my projects libs folder.
  2. 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");

});

有时我插入下面的code在我的JavaScript文件或index.html,无论哪种方式,我没有看到广告。

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);


深信人一定已经得到了这对他们的应用程序工作。我真的AP preciate任何协助提供。

Am sure people must have gotten this to work on their apps. I would really appreciate any assistance offered.

非常感谢。

推荐答案

你有没有做过这样的:

打开/res/xml/plugins.xml,加上下面几行:

Open /res/xml/plugins.xml, add following lines:

<plugin name="LeadboltPlugin" value="com.LeadboltPlugin.LeadboltPlugin" />  
<plugin name="LeadboltNotificationPlugin" value="com.LeadboltPlugin.LeadboltNotificationPlugin" />

这篇关于在PhoneGap的Andr​​oid应用显示leadbolt广告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆