Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hello,
How can I put admob ads in a drupalgap android app?
Thanks
Hello,
How can I put admob ads in a drupalgap android app?
Thanks
Comments
Comment #1
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedI've never used admob ads, so I don't know for sure. But I bet the first step is to try placing them in a custom block...? http://drupalgap.org/node/169
Try that, and please report back your findings, along with your sample code.
Comment #2
coolman7 CreditAttribution: coolman7 commentedAdMob is Google's AdSense equivalent. There are bunch of Cordova AdMob plugins. But I don't know how to integrate them with drupalgap blocks.
Comment #3
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedAll of that text isn't helpful. None of it looks like sample admob code. If you'd like proper assistance, we're going to need proper direction.
Comment #4
coolman7 CreditAttribution: coolman7 commentedThere was no source code in my previous post. It only displays following command's output which displays admob plugins for cordova (phonegap):
$ cordova plugin search admob
If I can find document how can I use cordova (phonegap) plugins with drupalgap, I will try to do.
Comment #5
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedInstalling the plugin is easy, and you should be done. I would imagine admob has snippet(s) of JavaScript that you would drop onto an HTML page to display the ad. No?
Comment #6
coolman7 CreditAttribution: coolman7 commentedI'll try and if I will be successful, I'll post the code here.
Thanks
Comment #7
coolman7 CreditAttribution: coolman7 commentedI found a workaround. It could be cleaner, but this seems to be working for me.
Add following plugin with this command:
cordova plugin add com.rjfun.cordova.plugin.admob
Add following code to www/index.html
And change
<body>
tag of www/index.html to<body onload="onDocLoad()" onresize="onResize()">
Comment #8
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedThanks for sharing this information.
Comment #9
coolman7 CreditAttribution: coolman7 commentedThis code was working with SDK rc4 or rc5, but not working with newly release SDK 1.0. It displays undefined undefined at the bottom of every pages.
Comment #10
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedSince that is custom code, you'll have to step through it with dpm() or the console.log() and figure out what is going on.
Comment #11
coolman7 CreditAttribution: coolman7 commentedit looks like it is about theme. I deleted footer from settings.js, then it displays "undefinedundefined" at the end of every page.
Than I modified theme and deleted all footer settings from theme, now undefined disappeared.
Comment #12
JodyLee CreditAttribution: JodyLee commentedHi, I'm having trouble with this code and plugins to monetise apps with AdMob & DFP... I keep getting the alert - admob plugin not ready.
Is there something new I need to do?
And I'd rather use AdMobPro to use the other services too or manually add Admob and DFP SDKs if possible.
Can you help with this issue?
Thanks.