Я не могу сделать просто страницу html с Interstitial Add. Я новичок в программировании, и я понятия не имею, что в этом коде не так. Я делаю приложение с телефонной связью. Я добавил также <gap:plugin name="com.admob.plugin" version="3.0.0" source="plugins.cordova.io" />
в свой config.xml. Пожалуйста помоги. Вот что у меня уже есть:Межстраничное объявление не отображается
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript">
function showInterstitial(){
admob.isInterstitialReady(function(isReady){
if(isReady){
admob.showInterstitial();
}else{
alert("need cached before show");
}
});
}
function onInterstitialReceive (message) {
alert("onMInterstitialReceive ,you can show it now");
}
function onReceiveFail (message) {
var msg=admob.Error[message.data];
if(msg==undefined){
msg=message.data;
}
alert("load fail: "+message.type+" "+msg);
}
function onDeviceReady() {
admob.initAdmob("ca-app-pub-5461976332457981/1789654352","ca-app-pub-5461976332457981/7220849555");
document.addEventListener(admob.Event.onInterstitialReceive, onInterstitialReceive, false);
document.addEventListener(admob.Event.onInterstitialFailedReceive,onReceiveFail, false);
}
document.addEventListener('deviceready',onDeviceReady, false);
</script>
</body>
</html>