Admob Position

5 posts, 0 answers
  1. HSLaw
    HSLaw avatar
    153 posts
    Member since:
    Jan 2006

    Posted 25 Nov 2014 Link to this post

    Hi,

    Now I'm able to show Admob on top/bottom of the view.

    How can I show an ads in the view? E.g. between the header and the content or between the footer and the content?

    Thanks.
  2. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 27 Nov 2014 Link to this post

    Hi,

    I am not sure whether you can choose a different position of the ads except top/bottom and the whole screen on in the face of interstitial ad, but you will have to check the settings of the plugin you are using in your app. Maybe there is a plugin that could allow such modifications.

    Maybe you will find interesting the Ad placement policy of Google on the matter.

    As a side note, I would like to kindly ask you to consider renewing your license in order to benefit from AppBuilder support service.

    Regards,
    Zdravko
    Telerik
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
  3. XiMnet Malaysia
    XiMnet Malaysia avatar
    46 posts
    Member since:
    Jan 2006

    Posted 27 Nov 2014 in reply to Zdravko Link to this post

    Hi Zdravko,

    I'm the thread starter replying with our license's account.
    I noticed the code for interstitial ad is commented in the sample code.
    Is it supported yet?
    When I try the code there is no ads displayed.

    Below is the snippets:

    ,
     
        fn_show_interstitial_view: function () {
             
              alert("interstitial");
             
            if (this.fn_check_simulator()) {
                return;
            }
     
            var admob_ios_key = app_config.admob_interstitial_ios_key;
            var admob_android_key = app_config.admob_interstitial_android_key;
            // var admob_wp8_key = 'ca-app-pub-9517346003011652/2695027726'; // future work
     
            var adMobKey = (navigator.userAgent.indexOf('Android') >= 0) ? admob_android_key : admob_ios_key;
     
              alert(adMobKey);
             
            window.plugins.AdMob.createInterstitialView(
                // createInterstitialView params
                {
                    'publisherId': adMobKey
                },
                // createInterstitialView success callback
                function () {
                    window.plugins.AdMob.requestInterstitialAd(
                        // requestInterstitialAd  params
                        { 'isTesting': false },
                        // requestInterstitialAd  success callback
                        function () {
                             
                          window.plugins.AdMob.showAd(
                              // showAd params
                              true,
                              // showAd success callback
                              function() {alert('show ok')},
                              // showAd error callback
                              function() { alert('failed to show ad')});
                               
                        },
                        // requestInterstitialAd  error callback
                        function () { alert('failed to request ad'); }
                    );
                },
                // createInterstitialView error callback
                function () { alert('failed to create banner view'); }
            );
        },

    Thanks.
  4. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 01 Dec 2014 Link to this post

    Hello,

    I guess you are talking about the app from our plugins marketplace. If this is the case you will notice in the About section there a note explaining that fullscreen banners are unavailable in the current version.

    However, I was able to show interstitial ad using this plugin. To do that on your side you will have to export the plugins from the Plugins folder of my sample app attached in this thread and import them in your app. I made a few changes to the plugins because we still don't support dependencies like the one from below and one of the plugins used such.

    <dependency id="com.google.playservices@19.0.0"/>

    Furthermore, you will have to register interstitial ad unit in your AdMob console and provide it in the initAd() function.

    If you need any further assistance I will be glad to help.

    Regards,
    Zdravko
    Telerik
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
  5. XiMnet Malaysia
    XiMnet Malaysia avatar
    46 posts
    Member since:
    Jan 2006

    Posted 01 Dec 2014 in reply to Zdravko Link to this post

    Thanks, Zdravko.

Back to Top