INTERSTITIAL

Integration


Add the next lines in your “/www/js/index.js” of phonegap:

                var tappxSetting = {
                    ios : "YOUR IOS TAPPX KEY",
                    android : "YOUR ANDROID TAPPX KEY",
                };
                var tappxKey = (/(android)/i.test(navigator.userAgent)) ? tappxSetting.android : tappxSetting.ios;

                tappxphonegap.createInterstitial(true, tappxKey,
                    function() {
                        // Succes Callback
                    },
                    function() {
                        // Error Callback
                    }
                );

Parameters:

  1. Parameter: true or false. Show the Interstitial automatically.
  2. Parameter: string. TAPPX KEY.
  3. Success: Method that is called if the creation and ad load succeed.
  4. Error : Method that is called if an error occurs during the creation or ad load.

isReady: allows you to check if the ad is ready to be shown. You will receive a "true" if the ad is ready and a "false" if not.

                tappxphonegap.isReady(function(msg) {},function(err) {}))

showInterstitial: allows you to display the interstitial ad that was previously loaded.

                tappxphonegap.showInterstitial(function(msg){},function(err{});

Events


You can add listener events into the Interstitial to be notified when a specific event happens in the ad. Here you have examples:

Function Explanation
function void tappxInterstitialDidFinishLoad(){} It will be called when the creative has been correctly received.
function void tappxInterstitialDidFail(string error){} It will be called when there is an error while receiving the creative.
function void tappxInterstitialDidAppear(){} It will be called when the ad appears.
function void tappxInterstitialDidPress(){} It will be called when the user clicks on the ad.
function void tappxInterstitialDidClose(){} It will be called when the user closes the ad.

Tappx © 2020