Home / Phonegap / Interstitials / Integración

iOS Monetization+Cross

Integración

Añadir las siguientes funciones a nuestro index.js de phonegap dentro de la carpeta /www/js/:

var tappxSetting = {
ios: 'YOUR IOS TAPPX KEY',
android: 'YOUR ANDROID TAPPX KEY'
}
var tappxKey = /(android)/i.t(navigator.userAgent)
? tappxSettiandroid
: tappxSetting.io
tappxphonegap.createInterstitial(
trutappxKey,
function () {
// Succes Callback
},
function () {
// Error Callback
}
)

Parámetros:

  1. Parameter: true o false.Muestra el Interstitial automáticamente.
  2. Parameter: string.La TAPPX KEY.
  3. Success: Método que se ejecutará en caso de éxito en la creación y carga del anuncio.
  4. Error : Método que se ejecutará en caso de error en la creación o carga del anuncio.

isReady: permite comprobar si el anuncio está listo para ser mostrado. Recibirás un “true” si está listo y “false” si no lo está.

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

showInterstitial: permite mostrar el intestitial que previamente está cargado.

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