InMobi插页式广告未显示在Android上

时间:2014-09-26 06:46:35

标签: android ads interstitial inmobi

我尝试按照提及的说明here.

将InMobi插页式广告整合到我的Android应用中

以下是我在活动类中加入的用于显示插页式广告的代码。

我没有例外,但每次运行代码时,都会调用回调方法 onInterstitialFailed ,显示消息"广告请求成功但没有找到广告&#34 ;

期待回应/解决方案

interstitial = new IMInterstitial(this,
                "I mention the property_id");
        interstitial.loadInterstitial();
interstitial.setIMInterstitialListener(new IMInterstitialListener() {

            @Override
            public void onShowInterstitialScreen(IMInterstitial arg0) {
                Log.i("onShowInterstitialScreen", "inside");
            }

            @Override
            public void onLeaveApplication(IMInterstitial arg0) {
                Log.i("onLeaveApplication", "inside");
            }

            @Override
            public void onDismissInterstitialScreen(IMInterstitial arg0) {
                Log.i("onDismissInterstitialScreen", "inside");
            }

            @Override
            public void onInterstitialLoaded(IMInterstitial arg0) {

                if (interstitial.getState() == IMInterstitial.State.READY) {
                    Log.i("Inside Interstitial Ready state", "Ready");
                    interstitial.loadInterstitial();
                    interstitial.show();
                }

            }

            @Override
            public void onInterstitialInteraction(IMInterstitial interstitial,
                    Map<String, String> params) {
                Log.i("onInterstitialInteraction", "inside");
            }

            @Override
            public void onInterstitialFailed(IMInterstitial arg0,
                    IMErrorCode arg1) {
                Log.i("onInterstialFailed", "Failed " + arg1);
            }
        });

1 个答案:

答案 0 :(得分:0)

我为InMobi工作。

你应该致电

onInterstitialFailed中的interstitial.loadInterstitial()而不是回调的onInterstitialLoaded()。

如果有效,请告诉我。 另外,你能告诉我你的房产ID吗?