npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-supersonicads

v0.2.2

Published

Ads support for supersonic ads to Cordova and Phonegap apps

Downloads

3

Readme

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();
    
    // 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