Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-ironsource

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-ironsource

Ads support for ironSource ads to Cordova and Phonegap apps

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

Supersonic Ads Cordova Plugin

Add support for Supersonic Ads to your Cordova and Phonegap based mobile apps.

How do I install it?

If you're like me and using CLI:

cordova plugin add cordova-plugin-supersonicads

or

cordova plugin add https://github.com/blakgeek/cordova-plugin-supersonicads

or

phonegap local plugin add https://github.com/blakgeek/cordova-plugin-supersonicads

How do I use it?

document.addEventListener('deviceready', function() {

	var ssAds = new SupersonicAds("yo_app_key", "some_unique_userid");
	
	// show a rewarded ad
	ssAds.showRewardedAd();
    	
	// show a rewarded ad for placement RightHere
	ssAds.showRewardedAd("RightHere");
    
	// show an offerwall
    ssAds.showOfferWall();
    
    // show an interstitial
    ssAds.showInterstitial();

    // launch in Android Studio/Xcode mediation integration verification
    ssAds.validateIntegration();

    // Check is a rewarded video is available to show
    ssAds.isRewardedVideoAvailable(function () {
    	alert('Yes');
	}, function () {
		alert('No');
	});

	// Check is an interstitial is available to show
    ssAds.isInterstitialAdAvailable(function () {
    	alert('Yes');
	}, function () {
		alert('No');	
	});
    
    // give em some credit
	window.addEventListener("offerwallCreditReceived", function(e) {
	    
	    var credit = e.credit;
	    
	    // The number of credits the user has earned.
	    console.log(credit.amount);
	    
	    // The total number of credits ever earned by the user.
	    console.log(credit.total):
	    
	    // estimated flag is the same as totalCreditsFlag 
	    // In some cases, we won’t be able to provide the exact
        // amount of credits since the last event (specifically if the user clears
        // the app’s data). In this case the ‘credits’ will be equal to the ‘totalCredits’,
        // and this flag will be ‘true’.
	    console.log(credit.estimated);
	    
	}, false);
	
	// reward your users
	window.addEventListener("rewardedVideoRewardReceived", function(e) {
		
		var placement = e.placement;
		console.log(placement.id); // only available on android
		console.log(placement.name);
		console.log(placement.reward);
		console.log(placement.amount);
	}, false);
    
}, false);

Can I just see a working example?

Yep. Check out the demo project. It runs on both Android and iOS.

What other events are supported?

Interstitial

  1. interstitialInitialized
  2. interstitialInitializationFailed
  3. interstitialAvailabilityChanged
  4. interstitialShown
  5. interstitialShowFailed
  6. interstitialClicked
  7. interstitialClosed

Offerwall

  1. offerwallClosed
  2. offerwallCreditFailed
  3. offerwallCreditReceived
  4. offerwallShowFailed
  5. offerwallOpened
  6. offerwallInitializationFailed
  7. offerwallInitialized

Rewarded Video

  1. rewardedVideoRewardReceived
  2. rewardedVideoEnded
  3. rewardedVideoStarted
  4. rewardedVideoAvailabilityChanged
  5. rewardedVideoClosed
  6. rewardedVideoOpened
  7. rewardedVideoInitializationFailed
  8. rewardedVideoInitialized
  9. rewardedVideoFailed

Keywords

FAQs

Package last updated on 29 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc