Code Monkey home page Code Monkey logo

cordova-plugin-admob's People

Contributors

aliokan avatar bryant1410 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-plugin-admob's Issues

Put adview on top of webview?

Hi,

Is there any way to position the adview on top of the webview instead of resizing it?

webView.addView(adView) does this but I can't then position the ad to the bottom or align it centrally.

How to Show / Hide Ad?

Is there a way to show / hide the ad after the ad is successfully served?

For example I want the ad to show in certain pages only and in some pages I want it to be hidden.

I suppose calling the killAd function is not the same, right?

I did try it on iOS 6 and iOS 7 (Cordova 3.3) but the killAd function does not seem to work.

Undefined symbols for architecture arm64:

I'm getting the following error on archive, I believe the AdMob SDK may need to be upgraded in the plugin.

Undefined symbols for architecture arm64:
"OBJC_CLASS$_GADAdMobExtras", referenced from:
objc-class-ref in AdMobPlugin.o
"_kGADAdSizeFullBanner", referenced from:
-[AdMobPlugin GADAdSizeFromString:] in AdMobPlugin.o
"OBJC_CLASS$_GADRequest", referenced from:
objc-class-ref in AdMobPlugin.o
"OBJC_CLASS$_GADInterstitial", referenced from:
objc-class-ref in AdMobPlugin.o
"OBJC_CLASS$_GADBannerView", referenced from:
objc-class-ref in AdMobPlugin.o
"_kGADAdSizeSmartBannerLandscape", referenced from:
-[AdMobPlugin GADAdSizeFromString:] in AdMobPlugin.o
-[AdMobPlugin resizeViews] in AdMobPlugin.o
"_kGADAdSizeLeaderboard", referenced from:
-[AdMobPlugin GADAdSizeFromString:] in AdMobPlugin.o
"_kGADAdSizeBanner", referenced from:
-[AdMobPlugin GADAdSizeFromString:] in AdMobPlugin.o
"_kGADAdSizeInvalid", referenced from:
-[AdMobPlugin createBannerView:] in AdMobPlugin.o
-[AdMobPlugin GADAdSizeFromString:] in AdMobPlugin.o
"_kGADAdSizeSmartBannerPortrait", referenced from:
-[AdMobPlugin GADAdSizeFromString:] in AdMobPlugin.o
-[AdMobPlugin resizeViews] in AdMobPlugin.o
"_kGADAdSizeMediumRectangle", referenced from:
-[AdMobPlugin GADAdSizeFromString:] in AdMobPlugin.o
"_GADAdSizeEqualToSize", referenced from:
-[AdMobPlugin createBannerView:] in AdMobPlugin.o
-[AdMobPlugin resizeViews] in AdMobPlugin.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Flickering with jquery mobile

When I start ads, the screen often flickers

  1. when the ad animates
  2. when I scroll a long page

Any idea what could be causing this?

calss not found

Hi,

I'm trying to implement this plugin on my 1st phone gap app but without succeeded.
I put the AdMobPlugin.js script on root directory and also add reference in page after the cordova.js reference, also I put the AdMobPlugin.java file in com\google\cordova\plugin folder and put the content of plugin.xml in pluginS.xml in res\xml folder.

I build the app with phonegap 2.9 and everything is OK.
when I run it on my device I got "class not found" error message from the failure function

I found that is occurred after cordova.exec.

Did I miss something, please advise!

thanks

Phonegap Build

Can we get this plugin available in PhoneGap build?

Regards,
Aliaks

Can this plugin be integrated into Sencha Touch 2?

I am trying to integrate this Plugin into an app created with Sencha Touch 2.4, but it doesn't seem to display anything....any ideas how to get this working?

This is what I found so far. But nothing happens

                  listeners: {
                        painted: function ( me, eOpts ) {


                            setTimeout(function() {

                    var success = function() {
                        admob.requestAd({
                            'isTesting': false,
                            'extras': {
                                'color_bg': 'AAAAFF',
                                'color_bg_top': 'FFFFFF',
                                'color_border': 'FFFFFF',
                                'color_link': '000080',
                                'color_text': '808080',
                                'color_url': '008000'
                            }
                        },
                        successCallback,
                        failureCallback
                        );
                    };
                    var error = function(message) {
                        alert('Error');
                    };

                    var successCallback = function(el) {
                        alert(el);
                        alert('successCallback');
                    };

                    var failureCallback = function() {
                        alert('failureCallback');
                    };

                    var options = {
                        'publisherId': 'ca-app-pub-****************/********** ',    
                        'adSize': admob.AD_SIZE.BANNER
                    }

                    admob.createInterstitialView(options, success, error);
                    //admob.createBannerView(options, success, error);

            }, 2000);

                        }

                    }

            }

Apps crash with android Jelly Been

Hello !
App crash with android JellyBeen,
After onReceiveAd(), app return "
01-04 17:30:20.000: A/libc(4488): Fatal signal 11 (SIGSEGV) at 0x00000008 (code=1), thread 4488 (.cosmix.grawler)"

the problem is caused by an hardware acceleration issue, which can be solved turning hardwareAccelerated to false into AndroidManifest,
but doing this the app graphics quality highly decrease,

is there any solution, like only target the admob plugin hardware acceleration ?
trying to doing it into AndroidManifest activity doesn't work.

Regards,

Banner and Interstitial ads do not work together

thanks for this great plugin! i got banner ads and interstitial ads working separately, however if i put both of them together interstateial will refresh banner, instead of load full screen ads. any suggestions would be greatly appreciated! thank you.

iOS 7 and status bar

Looks like there is an issue with the way this plugin moves and resizes webView. In iOS 7 status bar covers the top of main view. You can change this behaviour using this plugin 'com.phonegap.plugin.statusbar' (move webView down 20px), but this plugin after initialization moves webView back to top.
f1a7945e-b853-11e3-8159-2158bead550a
Looks like by changing the following code:

  // Move the webview to the top of the screen.
    webViewFrame.origin.y = 0; 
 ...
webViewFrame.size.height = superViewFrame.size.height - bannerViewFrame.size.height;

To:

  // Move the webview to the top of the screen.
    if ([[UIDevice currentDevice].systemVersion floatValue] >= 7)
      webViewFrame.origin.y = 20;
    else
      webViewFrame.origin.y = 0;
   ...
      webViewFrame.size.height = superViewFrame.size.height - webViewFrame.origin.y - bannerViewFrame.size.height;

Resolves the issue, but I'm not sure what else it can break.

'isTesting': true not working

I have implemented this plugin in a game I am developing, when I run the game from with the emulator included in the adt it serves test adverts. However when deploying the debug apk to my nexus 4 for testing it serves non-testing adverts. This is a little concerning as it can result in banning from admob.

I have ensured that the admob.requestAd method is passed the value of true to the isTesting property.

Phonegap 3.5?

Google has insisted that phonegap/cordova applications be upgraded to version 3.5. Not as easy as it sounds by the way. Had to upgrade eclipse, etc. After installing the plugin, it does not appear in the src packages folder in eclipse. Is this plugin supported in version 3.5? Thanks.

Can't display ad on iOS

Hey, here is my code. It works nicely on Android but it doesn't work on iOS. In the Xcode emulator I have a white empty banner, on an iPhone 3 device, nothing happens at all.

var admob_ios_key = 'ca-app-pub-6068517762438360/4083177731';
var admob_android_key = 'ca-app-pub-6068517762438360/7720118534';
var adId = (navigator.userAgent.indexOf('Android') >=0) ? admob_android_key : admob_ios_key;


admob.createBannerView(
     {
       'publisherId': adId,
       'adSize': admob.AD_SIZE.BANNER
     },
     function(){
          admob.requestAd(
          {
          'isTesting': false,
          'extras': {
          'color_bg': 'AAAAFF',
          'color_bg_top': 'FFFFFF',
          'color_border': 'FFFFFF',
          'color_link': '000080',
          'color_text': '808080',
          'color_url': '008000'
          },
          },
          function(){

          },
          function(){
            alert("request error");
          }
          );
     },
     function(){
      alert("create error")
     }
      );

Any idea what's going on ?

Can't show admob

Can't show admob.There's no example,so I created by myself.But nothing displays.
Tested on iPhone 5 and iPad 4.

In config.xml :
<feature name="AdMobPlugin"> <param name="ios-package" value="AdMobPlugin" /> </feature>

In index.html

    <body onload="onLoad()">

   <script>
                function onLoad() {
                    document.addEventListener("deviceready", onDeviceReady, false);
                }
            function onDeviceReady() {
                var admob_ios_key = 'a151e6d43c5a28f';
                var admob_android_key = 'a151e6d65b12438';
                var adId = (navigator.userAgent.indexOf('Android') >=0) ? admob_android_key : admob_ios_key;

                if ( window.plugins && window.plugins.AdMobPlugin ) {
                                } else {
                    alert('AdMobPlugin plugin not available/ready.');
                }
                   var am = window.plugins.AdMobPlugin;
                                am.createBannerView(
                                                    {
                                                    'publisherId': adId,
                                                    'adSize': am.AD_SIZE.BANNER,
                                                    'bannerAtTop': true
                                                    }, function() {
                                                    am.requestAd( { 'isTesting':false }, function() {
                                                                 am.showAd( true );
                                                                 }, function() {
                                                                 alert('failed to request ad');
                                                                 })
                                                    }, function(){
                                                    alert( "failed to create ad view" );
                                                    });

            }
            </script>    

The "alert('AdMobPlugin plugin not available/ready.');" alerts every time, although I've added plugin sources into work project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.