aliokan / cordova-plugin-admob

AdMob Phonegap Plugin for Android and iOS
MIT License
71 stars 43 forks source link

Can this plugin be integrated into Sencha Touch 2? #23

Open mrweix opened 9 years ago

mrweix commented 9 years ago

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);

                        }

                    }

            }