2

Sorry my bad english.

I'm starting on Appodeal sdk on Cordova project. In the first day my code work fine, but now, stop to work.

On the event deviceReady

  var appoAppKey = "myAppKey";
  if (! Appodeal ) {
    alert( 'Appodeal plugin not ready' );
    return;
  }
  Appodeal.disableLocationPermissionCheck();
  Appodeal.initialize(appoAppKey, Appodeal.INTERSTITIAL | Appodeal.BANNER | Appodeal.REWARDED_VIDEO | Appodeal.NON_SKIPPABLE_VIDEO);

Call to Reward:

$scope.iniciarCompraVagaAnuncio = function(){
  Appodeal.show(Appodeal.REWARDED_VIDEO);
}

Listening callback:

Appodeal.enableRewardedVideoCallbacks(true);

document.addEventListener('onRewardedVideoLoaded', function(){console.log("onRewardedVideoLoaded")});
document.addEventListener('onRewardedVideoFailedToLoad', function(){console.log("onRewardedVideoFailedToLoad")});
document.addEventListener('onRewardedVideoShown', function(){console.log("onRewardedVideoShown")});
document.addEventListener('onRewardedVideoFinished', function(data){
    console.log(data);  //data.amount  - amount of reward, data.name - reward name
    $scope.compraVagaAnuncio(data);
});
document.addEventListener('onRewardedVideoClosed', function(){console.log("onRewardedVideoClosed")});

Almost every time:

onRewardedVideoFailedToLoad

Appodeal.show(Appodeal.INTERSTITIAL); work fine on same buttom.

0 Answers0