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-adcash

v1.0.0

Published

Convert your application traffic to profit with Adcash mobile ads.

Downloads

3

Readme

AdCash Plugin

Quick Demo

# install cordova CLI
[sudo] npm install cordova -g

# install a small utility to run all the commands for you
[sudo] npm install plugin-verify -g

# run adcash demo with sample index.html
plugin-verify cordova-plugin-adcash

Show Banner ad with single line of javascript code

  1. Step 1: Create zone Id for your banner and interstitial, in AdCash portal, then use it in step 2 in your code.

  2. Step 2: Want a banner? single line of javascript code.

// it will display smart banner at the bottom, using the default options
var AdcashSDK = cordova.plugins.AdcashSDK;

AdcashSDK.createBanner({zoneId: 'ADD_YOUR_BANNER_ZONE_ID_HERE', 
						position: AdcashSDK.AD_POSITION.BOTTOM, 
						autoShow: true});

Step 3: Want full screen Ad? Easy, 2 lines of code.

var AdcashSDK = cordova.plugins.AdcashSDK;

// prepare and load ad resource in background, e.g. at begining of game level
AdcashSDK.prepareInterstitial({zoneId:'ADD_YOUR_INTERSTITIAL_ZONE_ID_HERE',
							   autoShow:true} );

// Alternatively, you can set prepare the interstitial
// and show it manually at some later point of time:
AdcashSDK.prepareInterstitial({zoneId:'ADD_YOUR_INTERSTITIAL_ZONE_ID_HERE',
							   autoShow:false},
							   function() {
									// Succeeded, we can now show the interstitial
									AdcashSDK.showInterstitial();
								},
								function(error){
									// Failed to prepare interstitial
								}

Features

Platforms supported:

  • Android
  • iOS

How to use?

Note: cordova-plugin-adcash is available both in PlugReg.com and npmjs.com plugin registries.

  • If use with Cordova CLI:
cordova plugin add cordova-plugin-adcash
  • If use with PhoneGap Build, just configure in config.xml:
<gap:plugin name="cordova-plugin-adcash" source="npm"/>

Quick start with cordova CLI

	# create a demo project
    cordova create test1 com.example.test1 Test1
    cd test1
    cordova platform add android
    cordova platform add ios

    # now add the plugin
    cordova plugin add cordova-plugin-adcash

    # now remove the default www content, copy the demo html file to www/
    rm -r www/*;
    cp plugins/cordova-plugin-adcash/test/* www/;

	# now build and run the demo in your device or emulator
    cordova prepare; 
    cordova run android; 
    cordova run ios;
    # or import into Xcode / Android Studio

Javascript API Overview

Methods:

// use banner
createBanner(zoneId/options, success, fail);
loadBanner( success, fail)
removeBanner(success, fail);
showBanner(success, fail);
hideBanner(success, fail);
// use interstitial
prepareInterstitial(zoneId/options, success, fail);
showInterstitial(success, fail);
// set default value for other methods
setOptions(options, success, fail);
// conversion tracking
reportAppOpen(success, fail)

Use setOptions to set values for the following variables:

| Option | Type | Description | |:---------:|:-------------------:|-------------------| |adSize| enum | Size of the banner. Look at AdcashSDK.AD_SIZE for possible values.| |position| enum | Position of the banner. Look at AdcashSDK.AD_POSITION for possible values.| |autoShow| boolean| Whether the banner/interstitial should be shown automatically when loaded.| |zoneId| string | Use in options ONLY when passed to createBanner or prepareInterstitial!!! Otherwise it will be ignored.|

Note: Take a look at AdcashSDK.js for full API usage.