cranberrygame / cordova-plugin-ad-admob

Other
10 stars 26 forks source link

Phonegap newbie #16

Closed sabrielle6 closed 7 years ago

sabrielle6 commented 7 years ago

Hi, I'm a total newbie - just to warn you, my level of understanding beyond javascript/html is minimal and I have no native experience. I'm building through the phonegap build service.

I have the plugin on my phonegap app.

it's building okay, I've checked that.

In the javascript it's setting all the bannerAdUnit+interstitialAdUnit+rewardedVideoAdUnit+isOverlap+isTest variables correctly

it doesnt throw up an error doing the window.admob.setUp(bannerAdUnit, interstitialAdUnit, rewardedVideoAdUnit, isOverlap, isTest)

but using try-catches to alert me, it's throwing up errors with:

window.admob.preloadInterstitialAd(); window.admob.showInterstitialAd(); window.admob.preloadRewardedVideoAd(); window.admob.showRewardedVideoAd();

because i'm doing all the build through phonegap (i have zero android native experience or knowledge) all i know is that there is an error, but not where it's coming from.

Does anyone have any pointers as to where the issues might be coming from, things i could try to rule out?

Thanks in advance,

sabrielle6 commented 7 years ago

I fixed this by explicitly linking to cordova.js in my index.html i.e:

and also i had to remove my

declaration