redfist / google-mobile-dev

Automatically exported from code.google.com/p/google-mobile-dev
0 stars 0 forks source link

Google adMod in Apache Cordova (PhoneGap) 2.0 without plugins #21

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am app developer for mobile device with Cordova Framework.
I would integrate Google adMod in my projects without plugins. I would utilize 
a simple javascript code, because I will control better how and when display 
ads banner in screen device, in any operating systems: WP7, Android, iOS...

I found some old article (june 2011) that it show how do it. It utilize 
"http://mmv.admob.com/static/iphone/iadmob.js" javascript file, but it don't 
works.

I trying this code:

<script type="text/javascript">
    var admob_vars = {
        pubid: 'a1501b#######150', // publisher id
        bgcolor: 'FFFFFF', // background color (hex)
        text: '000000', // font-color (hex)
        test: true // test mode, set to false to receive live ads
    };
</script>
<script type="text/javascript" 
src="http://mmv.admob.com/static/iphone/iadmob.js"></script> 
<div style="position:absolute; z-index:999999; left:1px; top:100px; width:100%; 
height:100px; background-color:#e0e0e0; color:Blue;">
    [Google Ads div]
    <div id="admob_ad"></div>
</div>
<script>
    _admob.fetchAd(document.getElementById('admob_ad'));
</script>

Who can help me?
Thank's!

Original issue reported on code.google.com by rios...@gmail.com on 4 Aug 2012 at 8:45

GoogleCodeExporter commented 8 years ago
Vc conseguiu resolver esta questão de cordova + wp7 + admob?

Original comment by joaopaul...@gmail.com on 2 Jan 2013 at 1:17

GoogleCodeExporter commented 8 years ago
The old article uses legacy AdMob JavaScript which is no longer supported. 
AdSense must be used for mobile websites. For those using Cordova, there is a 
native AdMob plugin for Android and iOS:

Android: 
https://github.com/rajpara11/phonegap-plugins/tree/master/Android/AdMobPlugin
iOS: https://github.com/rajpara11/phonegap-plugins/tree/master/iOS/AdMobPlugin

Original comment by eleichte...@google.com on 2 Jan 2013 at 4:47

GoogleCodeExporter commented 8 years ago
Does anyone know any solution for windows phone?

Original comment by joaopaul...@gmail.com on 2 Jan 2013 at 6:34