2

对不起我的英语不好。

我开始在 Cordova 项目上使用 Appodeal sdk。在第一天我的代码工作正常,但现在,停止工作。

在活动上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);

打赏电话:

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

监听回调:

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")});

几乎每次:

onRewardedVideoFailedToLoad

Appodeal.show(Appodeal.INTERSTITIAL);在同一个按钮上工作正常。

4

0 回答 0