2014-08-29 3 views
0

저는 내 libgdx android 응용 프로그램에 MoPub 삽입 광고를 구현하려고했습니다.MoPub android sdk onInterstitialLoaded는 결코 호출되지 않았습니다

MoPubInterstitial() 생성자에서 잘못된 ID를 전달하면 수신기의 onInterstitialFailed() 메서드가 올바르게 호출되지만 올바른 ID를 전달하면 아무 일도 발생하지 않습니다. onInterstitialLoaded()는 결국 호출되어야하지만 그렇지 않습니다. MoPubInterstitial.isReady()는 true가 아닙니다.

내가 누락 된 항목이 있습니까? 나는 코드의 어떤 부분을 붙여야하는지 잘 모른다. 나는 아이디어가 부족하다. 어떻게 디버깅 할 것인가.

제안 사항?

답변

0
private static final String MoPubInterstitialID = "xxxxxxxxxxxxx"; 
private MoPubInterstitial moPubInterstitial; 
moPubInterstitial = new MoPubInterstitial(this, MoPubInterstitialID); 
moPubInterstitial.setInterstitialAdListener(this); 
    moPubInterstitial.load(); 
    moPubInterstitialButton.setOnClickListener(new OnClickListener() { 
     public void onClick(View v) { 
      Log.d("MoPub", "Interstitial button clicked"); 

      if (moPubInterstitial.isReady()) 
      { 
       Log.d("MoPub", "Interstitial is Ready"); 
       moPubInterstitial.show(); 
       Log.d("MoPub", "Interstial Shown"); 
       moPubInterstitial.forceRefresh(); 
      } 


     } 
    }); 

이러한 모든 단계를 거쳐 작동됩니다. 궁금한 점이 있으면 알려주세요.