Skip to content

chinatjnet/cordova-plugin-vungle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cordova-plugin-vungle

Present video Ad with vungle in Mobile App/Games natively from JavaScript.

Highlights:

  • Display video Ad with single line of Js code.
  • One plugin supports both Android and iOS platform.

Compatible with:

  • Cordova CLI, v3.5+
  • Intel XDK and Crosswalk, r1095+
  • IBM Worklight, v6.2+

How to use?

If use with Cordova CLI:

cordova plugin add cordova-plugin-vungle

Quick Start Example Code

Step 1: Prepare your Vungle App Id for your app, create it in Vungle website

var ad_units = {
  ios : "542f7adb9a76df343f00020e",
  android : "542f7bb4ba288b5605000028"
};

// select the right Ad Id according to platform
var adid = ( /(android)/i.test(navigator.userAgent) ) ? ad_units.android : ad_units.ios;

if(Vungle) Vungle.prepareRewardVideoAd(adId);

Step 2: Play the video ad when needed

// show the interstitial later, e.g. at end of game level
if(Vungle) Vungle.showRewardVideoAd();

Javascript API Overview

Methods:

// for reward video ad
prepareRewardVideoAd(adId);
showRewardVideoAd();

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 Vungle Plugin Pro offers the most flexibility and many options.

Check the [test/index.html] (https://github.com/floatinghotpot/cordova-plugin-vungle/blob/master/test/index.html).

Screenshots

Coming soon.

License

You can use this plugin for free during trial purpose. If it earns less than $1000 for you, you can continue to use for free.

If use in commercial project, please get a license, or, you have monetized more than $1000 using this plugin, you are also required to: either get a commercial license ($20), or, no need pay but share 2% Ad traffic, read the License Agreement for details. As a commercial customer, you will be supported with high priority, via private email or even Skype chat.

If you hope to get a fully open source plugin (either need DIY, or hope to get full control on the code), use this open source one instead. Fork and pull request is welcome, but please mention it's derived source. Simply renaming then publishing to npm is forbidden. Open source project URL: https://github.com/floatinghotpot/cordova-plugin-admob

Credits

This project is created and maintained by Raymond Xie.

More Cordova/PhoneGap plugins by Raymond Xie, find them in plugin registry, or find them in npm.

Project outsourcing and consulting service is also available. Please contact us if you have the business needs.

About

Cordova Plugin for Vungle

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 32.3%
  • Objective-C 25.5%
  • Java 23.4%
  • HTML 18.8%