Integrate advertising in cordova application

Obtain Phonegap advertising plugin (cordova advertising platform plugin)

To display ads in mobile applications need to ads plugins, 20150801 is the current version of ad management plugin Keymob, you wil see that the plugin contains common plugin files SRC, WWW, plugin.xml, as well as example, iosadapter, readme.md, readme_zh.md

Add advertising management plugin to cordova project

Add using advertising management library need the following a few steps
  1. Download and unpack keymob advertising management plugin
  2. Use the command to install the plugin, assuming that path of the plugin is d: \ keymobplugin
    cordova plugin add d:\keymobplugin

Add advertising related js code

1. Initialization Keymob
Initialization Keymob library management is the prerequisite to call other advertising functions, the following initialization method is to use the Keymob.com service
keymob.initFromKeymobService("1", true);
2.The display advertising
Shown the banner ads at the absolute position (0,200)
	keymob.showBannerAbsolute(keymob.AdSize.BANNER,0,200);

Processing for IOS project

You need add the platform libraries to the project path, open the project with xcode, then right-click on the project, select "add files to project" , choose files under folder iosadapters . If use gdt, you need to add -lstdc++ to Other Linker Flags.

Optimization for android

Generated in the android project assets directory below there are three folders,

biduad_plugin is baidu platform resources, if you do not use baidu advertising you can deleted it

gdt_plugin is gdt reqired files, if not used gdt ads can be deleted

com_keymob_sdks is Keymob default advertising platform, you can change it to other platform https://github.com/keymobdev/admob-adapter
Note:these 3 folder name cannot be modified

More tutorial of add ad in app   qq group 310513042   home