tappx-phonegap-build

2.0.1 • Public • Published

Tappx Phonegap and Cordova plugin

This is the Tappx plugin for Phonegap & Cordova. Start monetizing your Phonegap or Cordova apps with this plugin.


Platform SDK supported

  • iOS, using AdMob SDK for iOS, v7.3.1
  • Android, using Google Play Service for Android, v7.5

Install

Add the following tag to your config.xml file to show Tappx ads with your Phonegap Build apps:

<gap:plugin name="tappx-phonegap-build" source="npm"/>

To use the plugin with Cordova or with Phonegap CLI type the following command in your command line:

cordova plugin add tappx-phonegap

Setup

Note: Before continuing, ensure that you have a proper Tappx account, and optionally, an Admob account.

Place the following code in your deviceready event:

    function onDeviceReady() {
      document.removeEventListener('deviceready', onDeviceReady, false);
 
      // Set AdMobAds options:
      admob.setOptions({
        publisherId:          "NONE",                                    // Replace with your AdMob id (if you don't have any, set it to "NONE")
        tappxIdiOS:           "/XXXXXXXXX/Pub-XXXX-iOS-IIII",            // Replace with your Tappx Id for iOS
        tappxIdAndroid:       "/XXXXXXXXX/Pub-XXXX-Android-AAAA",        // Replace with your Tappx Id for Android
        tappxShare:           1                                          // Do not use lower tappxShare ratio if you have set publixherId to "NONE"
      });
 
      // Start showing banners (will show atomatically as autoShowBanner is set to true by default)
      admob.createBannerView();
 
      // Request interstitial (will present automatically as autoShowInterstitial is set to true by default)
      admob.requestInterstitial();
    }
 
    document.addEventListener("deviceready", onDeviceReady, false);

tappxShare parameter will specify the amout of traffic you want to share to Tappx, being 0 = 0% and 1 = 100%.

In example, if you would like to share 80% traffic source to Tappx and the rest to Admob, this would be the corresponding configuration:

      // Set AdMobAds options:
      admob.setOptions({
        publisherId:          "ca-app-pub-XXXXXXXXXXXXXXXX/BBBBBBBBBB",  // Replace with your AdMob id
        tappxIdiOS:           "/XXXXXXXXX/Pub-XXXX-iOS-IIII",            // Replace with your Tappx Id for iOS
        tappxIdAndroid:       "/XXXXXXXXX/Pub-XXXX-Android-AAAA",        // Replace with your Tappx Id for Android
        tappxShare:           0.8                                        // Do not use lower tappxShare ratio if you have set publixherId to "NONE"
      });

Full documentation

Visit the wiki pages to know in detail about Tappx Cordova plugin, where you will find the following topics:


License

The MIT License

Copyright (c) 2014 AppFeel

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Credits

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i tappx-phonegap-build

      Weekly Downloads

      1

      Version

      2.0.1

      License

      MIT

      Unpacked Size

      8.38 kB

      Total Files

      4

      Last publish

      Collaborators

      • appfeel