cordova-plugin-ironsource-ads-ka

Ironsource ads for cordova based development

Usage no npm install needed!

<script type="module">
  import cordovaPluginIronsourceAdsKa from 'https://cdn.skypack.dev/cordova-plugin-ironsource-ads-ka';
</script>

README

IronSource Ads Cordova Plugin (Kano Games Internal Version)


Table of Contents

State of Development


Install

cordova plugin add cordova-plugin-ironsource-ads

Usage

All methods support optional onSuccess and onFailure parameters

Initialization

IronSourceAds.init({
    appKey: appKey
});

Validate Integration

Once you have finished your integration, call the following function and confirm that everything in your integration is marked as VERIFIED:

IronSourceAds.validateIntegration();

Check xcode / android studio debugger for validation output


Set Dynamic User ID

The Dynamic UserID is a parameter that can be changed throughout the session and will be received in the server-to-server ad > rewarded callbacks. This parameter helps verify AdRewarded transactions and must be set before calling ShowRV.

IronSourceAds.setDynamicUserId({userId:'example'});

Rewarded Videos

Has Rewarded Video

IronSourceAds.hasRewardedVideo({
    onSuccess: function (available) {

    }
});

Show Rewarded Video

IronSourceAds.showRewardedVideo();

Rewarded Video Events

Rewarded Video Availabilty Changed

window.addEventListener("rewardedVideoAvailabilityChanged", function(event){

    var available = event.available;
    
});

Rewarded Video Rewarded

window.addEventListener("rewardedVideoRewardReceived", function(event){

    var placement = event.placement;
    var placementName = placement.placementName;
    var rewardAmount = placement.rewardAmount;
    var rewardName = placement.rewardName;
    
});

Rewarded Video Started

window.addEventListener("rewardedVideoStarted", function(){

});

Rewarded Video Ended

window.addEventListener("rewardedVideoEnded", function(){

});

Rewarded Video Opened

window.addEventListener("rewardedVideoOpened", function(){

});

Rewarded Video Closed

window.addEventListener("rewardedVideoClosed", function(){

});

Rewarded Video Failed

window.addEventListener("rewardedVideoFailed", function(){

});

Interstitial

Has Interstitial

IronSourceAds.hasInterstitial({
    onSuccess: function (available) {

    }
});

Load Interstitial

_Must be called before showInterstitial

IronSourceAds.loadInterstitial();

Show Interstitial

IronSourceAds.showInterstitial();

Interstitial Events

Interstitial Loaded

window.addEventListener("interstitialLoaded", function(){

});

Interstitial Shown

window.addEventListener("interstitialShown", function(){

});

Interstitial Show Failed

window.addEventListener("interstitialShowFailed", function(){

});

Interstitial Clicked

window.addEventListener("interstitialClicked", function(){

});

Interstitial Closed

window.addEventListener("interstitialClosed", function(){

});

Interstitial Will Open

window.addEventListener("interstitialClosed", function(){

});

Interstitial Failed To Load

window.addEventListener("interstitialFailedToLoad", function(){

});

Offerwalls

Has Offerwall

IronSourceAds.hasOfferwall({
    onSuccess: function (available) {

    }
});

Show Offerwall

IronSourceAds.showOfferwall();

Offerwall Events

Offerwall Availability Changed

window.addEventListener("offerwallAvailabilityChanged", function(event){
  var available = event.available;
});

Offerwall Shown

window.addEventListener("offerwallShown", function(){

});

Offerwall Credit Recieved

window.addEventListener("offerwallCreditReceived", function(event){
  
  var credits = event.credits; // The number of credits the user has earned since //the last (void)didReceiveOfferwallCredits:
  var totalCredits = event.totalCredits; //The total number of credits ever earned by the user
  
});

Offerwall Credit Failed

window.addEventListener("offerwallCreditFailed", function(){

});

Offerwall Closed

window.addEventListener("offerwallClosed", function(){

});

Offerwall Show Failed

window.addEventListener("offerwallShowFailed", function(){

});