MobFox Plugin Pro
Present MobFox Ads in Mobile App/Games natively from JavaScript.
Highlights:
- Easy-to-use APIs. Display Ad with single line of Js code.
- Support Banner, Interstitial Ad, and Video Ad.
- One plugin supports both Android and iOS platform.
- Multiple banner size, also support custom size.
- Fixed and overlapped mode.
- Auto fit on orientation change.
Compatible with:
- Cordova CLI, v3.5+
- Intel XDK and Crosswalk, r1095+
- IBM Worklight, v6.2+
- Google Mobile Chrome App
- Adobe PhoneGap Build, since 2014/12/9
How to use?
- If use with Cordova CLI:
cordova plugin add com.rjfun.cordova.mobfox
- If use with PhoneGap Buid, just configure in config.xml:
<gap:plugin name="com.rjfun.cordova.mobfox" source="plugins.cordova.io"/>
- If use with Intel XDK: Project -> CORDOVA 3.X HYBRID MOBILE APP SETTINGS -> PLUGINS AND PERMISSIONS -> Third-Party Plugins -> Add a Third-Party Plugin -> Get Plugin from the Web, input:
Name: MobFoxPluginPro
Plugin ID: com.rjfun.cordova.mobfox
[x] Plugin is located in the Apache Cordova Plugins Registry
Quick start with cordova CLI
Add the plugin to your cordova project with Cordova CLI:
cordova create <project_folder> com.<company_name>.<app_name> <AppName>cd <project_folder>cordova platform add androidcordova platform add ios cordova plugin add com.rjfun.cordova.mobfox // copy the demo html file to wwwrm -r www/*; cp plugins/com.rjfun.cordova.mobfox/test/index.html www/ // connect device or run in emulatorcordova prepare; cordova run android; cordova run ios; // or import into Xcode / eclipse
Quick Start Example Code
Step 1: Prepare your Mobfox publisher Id for your app, create it in MobFox website
var ad_units = ios : "publisher_id_for_ios_xxx" android : "publisher_id_for_android_xxx"; // select the right Ad Id according to platformvar publisherId = //i ? ad_unitsandroid : ad_unitsios;
Step 2: Create a banner with single line of javascript
// it will display smart banner at top center, using the default optionsifMobFox MobFox;
Or, show the banner Ad in some other way:
// or, show a default banner at bottomifMobFox MobFox;
Step 3: Prepare an interstitial, and show it when needed
// preppare and load ad resource in background, e.g. at begining of game levelifMobFox MobFox; // show the interstitial later, e.g. at end of game levelifMobFox MobFox;
Step 4: Prepare an video Ad, and show it when needed
// preppare and load ad resource in background, e.g. at begining of game levelifMobFox MobFox; // show the interstitial later, e.g. at end of game levelifMobFox MobFox;
Javascript API Overview
Methods:
// set default value for other methods; // for banner;;;;; // for interstitial;;
Detailed Documentation
The APIs, Events and Options are detailed documented.
Read the detailed API Reference Documentation English.
FAQ
If encounter problem when using the plugin, please read the FAQ first.
Full Example Code
This MobFox Plugin Pro offers the most flexibility and many options.
Check the test/index.html.
Screenshots
Banner | Interstitial | Video |
---|---|---|
any size | overlap | |
Ad PluginPro series for the world leading Mobile Ad services:
- GoogleAds PluginPro, for Google AdMob/DoubleClick.
- iAd PluginPro, for Apple iAd.
- FacebookAds PluginPro, for Facebook Audience Network.
- FlurryAds PluginPro, for Flurry Ads.
- mMedia PluginPro, for Millennial Meida.
- MobFox PluginPro, for MobFox.
- MoPub PluginPro, for MoPub.
More Cordova/PhoneGap plugins by Raymond Xie, find them in plugin registry.
If use in commercial project or need prompt support, please buy a license, you will be served with high priority.
Project outsourcing and consulting service is also available. Please contact us if you have the business needs.