科尔多瓦和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*/ }); } }更多推荐
发布评论