科尔多瓦和AdMob(Cordova and AdMob)

编程入门 行业动态 更新时间:2024-10-28 16:17:38
科尔多瓦和AdMob(Cordova and AdMob)

我正在使用带有cordova的AdMob来显示横幅。

我的问题是必须删除横幅暂停(当用户离开应用程序时)和恢复(用户再次使用应用程序)再次显示横幅?

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功能:

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*/ }); } }

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*/ }); } }

更多推荐

本文发布于:2023-07-21 07:22:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1208070.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:科尔   多瓦   Cordova   AdMob

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!