2015-02-06 55 views
4

我使用鈦AdMob的模塊,found here鈦AdMob聯播不斷檢查新廣告

我的應用程序有多個頁面,所以我對其中幾個加載廣告。

我的問題是經過幾次訪問後,每個廣告似乎都沒有被垃圾收集或殺死,所以在我的輸出中,我可以看到很多信息說明應用程序正在檢查廣告。這些是每隔60秒發生的而非,更接近每5秒。

我假設這會在應用程序運行時導致一些降級/電池使用。

是否有人知道我是如何「殺死」admob廣告的刷新?如果它特定於鈦,那就太好了。如果它特定於android,那麼讓我知道方法調用和概念,然後我會看看是否可以將它翻譯爲js鈦代碼!

[INFO] : Ads: Ad is not visible. Not refreshing ad. 
[INFO] : Ads: Scheduling ad refresh 60000 milliseconds from now. 
[INFO] : Ads: Ad is not visible. Not refreshing ad. 
[INFO] : Ads: Scheduling ad refresh 60000 milliseconds from now. 
[INFO] : Ads: Ad is not visible. Not refreshing ad. 
[INFO] : Ads: Scheduling ad refresh 60000 milliseconds from now. 
[INFO] : APSAnalyticsService: Analytics Service Started 
[INFO] : APSAnalyticsService: Stopping Analytics Service 
[INFO] : Ads: Ad is not visible. Not refreshing ad. 
[INFO] : Ads: Scheduling ad refresh 60000 milliseconds from now. 
[INFO] : Ads: Ad is not visible. Not refreshing ad. 
[INFO] : Ads: Scheduling ad refresh 60000 milliseconds from now. 
[INFO] : Ads: Ad is not visible. Not refreshing ad. 
[INFO] : Ads: Scheduling ad refresh 60000 milliseconds from now. 
[INFO] : Ads: Ad is not visible. Not refreshing ad. 
[INFO] : Ads: Scheduling ad refresh 60000 milliseconds from now. 
[INFO] : Ads: Ad is not visible. Not refreshing ad. 
[INFO] : Ads: Scheduling ad refresh 60000 milliseconds from now. 

回答

0

onPause()方法的Activity生命週期中,考慮暫停AdView mGoogleAdView;

  if (mGoogleAdView != null) { 
       mGoogleAdView.pause(); 
      } 

在生命週期中的onDestroy方法考慮

mGoogleAdView.destroy(); 

P.S:我沒有用鈦。