ratson / cordova-plugin-admob-free

New development has been moved to "admob-plus-cordova", https://github.com/admob-plus/admob-plus/tree/master/packages/cordova
https://github.com/admob-plus/admob-plus
MIT License
498 stars 212 forks source link

I can not run :( #87

Open omerorkmez opened 6 years ago

omerorkmez commented 6 years ago

/english bellow/ Merhabalar,

Bir süredir bu eklentiyi çalıştırmayı deniyorum ancak hiç bir şekilde bir tek reklam gösteremedim. Yeni -boş- proje oluşturdum ve (https://github.com/ratson/cordova-plugin-admob-free/tree/master/examples/basic) burada olan testi aynen uyguladım ancak hiç bir sonuç alamadım. Reklam birimi kimliklerini "cordova-plugin-admob-simple" eklentisi ile sorunsuz kullanıyorum.

Bu eklentiyi çalıştırabilmek için gerçekten ne yapmam gerektiğini anlamış değilim. :(

İzlediğim yollar;

bu kodları da index.js içerisindeki " function onDeviceReady() " fonksiyonuna ekledim. ("cordova-plugin-admob-simple" eklentisi bu şekilde çelıştığı için aynısını yaptım.)

Hiç bir şekilde uygulamada reklam gösterimi gerçekleştiremedim.

Yardımcı olursanız çok sevinirim.

İyi akşamlar.

/****/

Hi,

I'm trying to run this add-on, but I could not show a single ad at all. I created a new-empty project and applied the same test here (https://github.com/ratson/cordova-plugin-admob-free/tree/master/examples/basic), but I did not get any results. I use ad unit IDs with "cordova-plugin-admob-simple" plugin without any problems.

I do not really know what I need to do to run this add-on. :(

The paths I followed;

I added these codes to the function "onDeviceReady ()" function in index.js. (I did the same because the "cordova-plugin-admob-simple" plugin conflicted this way.)

I did not show ads in the app at all.

I would be glad if you help.

Good evening.

prantikv commented 6 years ago

try using window.admob.banner.show ()

omerorkmez commented 6 years ago

Hi,

Unfortunately, it did not work with this code either. The images of the pages are as follows;

I installed the "https://github.com/ratson/cordova-plugin-admob-free.git" plugin, after...

index.html ; `< !DOCTYPE html >

< html > < head > < meta name="format-detection" content="telephone=no" > < meta name="msapplication-tap-highlight" content="no" > < meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" > < title>Hello AdMob < script > // Create banner admob.banner.prepare(); < /script > < /head > < body > < h1>Hello AdMob < button id="showAd" onclick="admob.banner.show()">Show me some AD < script type="text/javascript" src="cordova.js"> < script type="text/javascript" src="scripts/index.js"> < /body > < /html >`

index.js; `var admobid = {} if (/(android)/i.test(navigator.userAgent)) { // for android & amazon-fireos admobid = { banner: 'ca-app-pub-9865674858057809/5071432708', //PUT ADMOB ADCODE HERE interstitial: 'ca-app-pub-9865674858057809/6548165902' //PUT ADMOB ADCODE HERE } } else if (/(ipod|iphone|ipad)/i.test(navigator.userAgent)) { // for ios admobid = { banner: 'ca-app-pub-9865674858057809/5071432708', //PUT ADMOB ADCODE HERE interstitial: 'ca-app-pub-9865674858057809/6548165902' //PUT ADMOB ADCODE HERE } }

document.addEventListener('deviceready', function () { admob.banner.config({ id: admobid.banner, isTesting: true, autoShow: true, }) admob.banner.prepare()

admob.interstitial.config({
    id: admobid.interstitial,
    isTesting: true,
    autoShow: false,
})
admob.interstitial.prepare()

document.getElementById('showAd').disabled = true
document.getElementById('showAd').onclick = function () {
    admob.interstitial.show()
}

}, false)

document.addEventListener('admob.banner.events.LOAD_FAIL', function (event) { console.log(event) })

document.addEventListener('admob.interstitial.events.LOAD_FAIL', function (event) { console.log(event) })

document.addEventListener('admob.interstitial.events.LOAD', function (event) { console.log(event) document.getElementById('showAd').disabled = false })

document.addEventListener('admob.interstitial.events.CLOSE', function (event) { console.log(event)

admob.interstitial.prepare()

})`

I would be glad if you help...

omerorkmez commented 6 years ago

Hi,

I look forward to your support.

omerorkmez commented 6 years ago

Hi,

I look forward to your support. :(

ratson commented 6 years ago

@omerorkmez Are you using the git version, which is not supported?

ManoloPololo commented 6 years ago

Hi. I'm facing the very same problem. I've created a test app, copied the files into the project, but the ads don't show. Steps I've followed:

When testing the app, no ad show when clicking the button Show me some AD.