Admob Installation

This forum contains topics that were moved from Get Satisfaction
asid
Posts: 0
Joined: Sun Aug 09, 2015 8:01 pm

Admob Installation

Post by asid »

Hi, trying the same on a new app, in test mode but no test adds showing.
Here what I did...

I made a clean test App.
set test = true in js file
// offsetTopBar: false, // avoid overlapped by status bar, for iOS7+
bgColor: 'black', // color name, or '#RRGGBB'
// x: integer, // valid when set position to 0 / POS_XY
// y: integer, // valid when set position to 0 / POS_XY
isTesting: true, // set to true, to receiving test ad for testing purpose
// autoShow: true // auto show interstitial ad when loaded, set to false if prepare/show

and in device ready event:
admob.requestAd(
{
'isTesting': true,
'extras': {
'color_bg': 'AAAAFF',
'color_bg_top': 'FFFFFF',
'color_border': 'FFFFFF',

Image
Mark7294305
Posts: 0
Joined: Fri Dec 26, 2014 2:10 am

Admob Installation

Post by Mark7294305 »

Hi Andrew
Ok this is what I did to get it working.

1.Download & import the latest 2.130 Admob pro
2. Add the following code to your js file

function onDeviceReady() {
document.removeEventListener('deviceready', onDeviceReady, false);

// Set AdMobAds options:
admob.setOptions({
publisherId: "ca-app-pub-**/***", // Required

});

// Start showing banners (atomatic when autoShowBanner is set to true)
admob.createBannerView();

}

document.addEventListener("deviceready", onDeviceReady, false);

3. Create a javascript on device ready and add the following code

if(AdMob) AdMob.createBanner( {
adId: admobid.banner,
position: AdMob.AD_POSITION.TOP_CENTER,
autoShow: true } );
Miguel Angel Dulcey Diaz
Posts: 0
Joined: Tue Aug 27, 2013 3:31 am

Admob Installation

Post by Miguel Angel Dulcey Diaz »

Hi Mark, The interstitial takes too long. I'll be doing something wrong?

AdMob.prepareInterstitial({
adId: admobid.interstitial,
autoShow: false
});

AdMob.isInterstitialReady(function(isready){
if(isready) AdMob.showInterstitial();
});
Istvan
Posts: 0
Joined: Mon Oct 13, 2014 1:48 pm

Admob Installation

Post by Istvan »

Hi,
Please help me.
1. ok
2. my js? Which js?
3. I would like ads only one page in my app. This page only?

I try this ... https://github.com/floatinghotpot/cor...

nothing :-(
Mark7294305
Posts: 0
Joined: Fri Dec 26, 2014 2:10 am

Admob Installation

Post by Mark7294305 »

Hi
If you look at your project, in your javascript folder do you have a javascript file there? If yes then add the above code to it. If no then create a new javascript file and add the code to the new file
Istvan
Posts: 0
Joined: Mon Oct 13, 2014 1:48 pm

Admob Installation

Post by Istvan »

Thanks Mark,
Working, but when i back to previus page the the ads stay. I would like on one page only .. How can i close it when the user navigate to previus page or other page?
Istvan
Posts: 0
Joined: Mon Oct 13, 2014 1:48 pm

Admob Installation

Post by Istvan »

Solution:
Page hide event, javascipt : Admod.removeBanner()
KorryRogers
Posts: 0
Joined: Fri Aug 15, 2014 2:53 am

Admob Installation

Post by KorryRogers »

I've got this working on Apple devices with no issues, but I can't get ads to show on an android device. I'm not getting any errors. In fact, my .apk was accepted to the Play store, but no ads show up. I'm not sure how to troubleshoot on an actual device. Any help is appreciated.
KorryRogers
Posts: 0
Joined: Fri Aug 15, 2014 2:53 am

Admob Installation

Post by KorryRogers »

Disregard. I had the wrong AdMob ID in there.
redwhiteblue4free
Posts: 0
Joined: Tue Jul 04, 2017 6:37 am

Admob Installation

Post by redwhiteblue4free »

hi mark, i follow what you said and import the plugin. the link to explain is too old and i skip the link.

when i build the export binary apk it get error. and when i try without the plugin it work.

im using jqm. how to get it work?

thanks
Post Reply