科尔多瓦和AdMob [英] Cordova and AdMob

查看:83
本文介绍了科尔多瓦和AdMob的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将AdMob和cordova一起使用来显示横幅.

I am using AdMob with cordova for displaying banners.

我的问题对于删除暂停(用户离开应用程序时)和恢复(用户再次选择应用程序)中的横幅广告是必要的吗?

My Question is necessary to remove banner in pause ( when user left the app ) and in resume ( user oppen again the app ) display the banner again ?

推荐答案

如果您要求一种可以在暂停时隐藏标题并在恢复时显示标题的方法(如果我有问题),则可以使用以下Cordova函数:

If you're asking for a method that could hide the banner when in pause and show the banner when in resume (if I got the question), you can use the following Cordova functions:

jQuery(document).ready(function($) {    
    $(document).on('deviceready', function() {
        /* Manage events */
        $(document).on('pause',                 function() {    /*Call function to hide banner*/                });
        $(document).on('resume',                function() {    /*Call function to show banner*/                });
    }
}

这篇关于科尔多瓦和AdMob的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆