Welcome to Cordova Plugin Unity Ads
Note
Note
- Code source: - UnityAds:
UnityAds.mp4
- Banner Ads
- Interstitial Ads
- Video Ads
- Set banner position
- Set banner size
cordova plugin add https://github.com/EMI-INDO/emi-indo-cordova-plugin-unityads
cordova plugin rm emi-indo-cordova-plugin-unityads
New documentation - index.html:
// Initializing the SDK in Android
// This needs to be done only once, ideally at app launch.
///////////////////// Initializing the SDK
cordova.plugins.emiUnityAdsPlugin.unitySdkInitialize(unityGameID);
var unityGameID = "5215769"
var bannerPlacementId = "Banner_Android"
var InterstitialPlacementId = "Interstitial_Android"
var videoPlacementId = "Rewarded_Android"
//////////////////// Event Initializing the SDK
document.addEventListener('onInitializationComplete', () => {
alert("on Sdk Initialization Complete");
});
document.addEventListener('onInitializationFailed', () => {
alert("on Sdk Initialization Failed");
});
// Load a Show cordova.plugins.emiUnityAdsPlugin.showBannerAd(bannerPlacementId);
// Hide cordova.plugins.emiUnityAdsPlugin.hideBannerAd();
// Load a Show cordova.plugins.emiUnityAdsPlugin.showInterstitialAd(InterstitialPlacementId);
// Load a Show cordova.plugins.emiUnityAdsPlugin.showVideoAd(videoPlacementId);
document.addEventListener('onBannerLoaded', () => {
alert("on Banner Loaded");
});
- onBannerLoaded
- onBannerFailedToLoad
- onBannerClick
- onBannerLeftApplication
- onUnityAdsAdLoaded.Interstitial
- onUnityAdsFailedToLoad.Interstitial
- onUnityAdsShowFailure.Interstitial
- onUnityAdsShowStart.Interstitial
- onUnityAdsShowClick.Interstitial
- onUnityAdsShowComplete.Interstitial
- onUnityAdsAdLoaded.video
- onUnityAdsFailedToLoad.video
- onUnityAdsShowFailure.video
- onUnityAdsShowStart.video
- onUnityAdsShowClick.video
- onUnityAdsShowComplete.video
- Android
Facebook Audience Network: - Ads:
Admob: - Ads: