的InMobi没有得到横幅或​​插页上首次运行 [英] InMobi not getting Banner or Interstitials on first run

查看:659
本文介绍了的InMobi没有得到横幅或​​插页上首次运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经集成到的InMobi我的Andr​​oid应用程序,当应用程序第一次运行不取任何广告(横幅或广告)。

如果我退出程序,然后再运行它,一切正常 - 横幅广告和插页被加载并显示的标题

如果我那么无论卸载并重新安装应用程序或者干脆清除应用的缓存(从设置),然后再次运行应用程序,我又回到了起点,我什么也没得到。请注意,这遵循这种模式的究竟,它不是随机的。总是在第一次运行 - 没有广告,总是在随后的运行中,广告

我要指出的(如果这很重要),我在测试模式(设置在仪表板的InMobi)。

下面是code我在的onCreate - 什么我做错了。

在回调返回的错误简直就是错误而获取广告(对于这两个横幅广告和插页)发生。

有没有进一步的信息,并没有任何的的InMobi网站(我可以看到)。任何帮助将是AP preciated。

  //初始化插页广告
    InMobi.initialize(这一点,myInterstitialID);    //初始化横幅
    InMobi.initialize(这一点,myBannerID);    //创建的旗帜
    imbanner =新IMBanner(这一点,myBannerID,IMBanner.INMOBI_AD_UNIT_320X50);
    //60秒间隔刷新
    imbanner.setRefreshInterval(60);
    //加载的旗帜
    imbanner.loadBanner();    //回调的横幅广告
    imbanner.setIMBannerListener(新IMBannerListener(){
        @覆盖
        公共无效onShowBannerScreen(IMBanner为arg0){
            Log.v(的InMobi,OnShowBannerScreen);
                }
            @覆盖
        公共无效onLeaveApplication(IMBanner为arg0){
                Log.v(的InMobi,请假申请);
        }
        @覆盖
        公共无效onDismissBannerScreen(IMBanner为arg0){
            Log.v(的InMobi,OnDismissBannerScreen);
        }
                @覆盖
        公共无效onBannerRequestFailed(IMBanner旗帜,IMError code错误code){
             Log.v(的InMobi,onBannerRequestFailed:+错误code);
        }
        @覆盖
        公共无效onBannerRequestSucceeded(IMBanner为arg0){
                Log.v(的InMobi,onBannerRequestSucceeded);
                }
                @覆盖
        公共无效onBannerInteraction(IMBanner为arg0,地图<字符串,字符串> ARG1){Log.v(的InMobi,onBannerInteraction);
        }
    });        //插页广告
        inInterstitial =新IMInterstitial(这一点,myInterstitialID);
        inInterstitial.loadInterstitial();        inInterstitial.setIMInterstitialListener(新IMInterstitialListener(){
            公共无效onShowInterstitialScreen(IMInterstitial为arg0){
                Log.v(的InMobi,间质性表现);
            }
            @覆盖
            公共无效onLeaveApplication(IMInterstitial为arg0){
                Log.v(的InMobi,间质性离开应用程序);
            }
            @覆盖
            公共无效onDismissInterstitialScreen(IMInterstitial为arg0){
                Log.v(的InMobi,驳回间质性);
                inInterstitial.loadInterstitial();
            }
            @覆盖
            公共无效onInterstitialLoaded(IMInterstitial为arg0){
                Log.v(的InMobi,间质性装);
            }
            @覆盖
            公共无效onInterstitialInteraction(IMInterstitial间隙,地图<字符串,字符串> PARAMS){
                Log.v(的InMobi,互动间质性);
            }
            @覆盖
            公共无效onInterstitialFailed(IMInterstitial为arg0,IMError code ARG1){
                Log.v(的InMobi,间质性失败:+ ARG1);
            }
        });


解决方案

@zippy是正确的。这是已知的行为,我们已经固定在即将发布的SDK(暂定在接下来的10天)。

免责声明:我从车队的InMobi我和管理的InMobi的SDK产品

I've integrated InMobi into my Android App and it doesn't fetch any ads when the app is first run (Banner or Interstitial).

If I exit the app and then run it again, everything works - Banner and Interstitial is loaded and the banner is displayed.

If I then either uninstall and re-install the app or simply clear the app's cache (from settings) and then run the app again, I'm back to square one and I get nothing. Please note this follows this pattern exactly, it's not random. Always on first run - no ads, always on subsequent runs, ads.

I should point out (in case this is important), I am in test mode (Set in the InMobi dashboard).

Below is the code I have in onCreate - What am I doing wrong?

The error returned in the call backs is simply An error occured while fetching the ad (For both Banner and Interstitial).

There is no further information and nothing on the InMobi website (that I can see). Any help would be appreciated.

    //Initialise Interstitials
    InMobi.initialize(this, myInterstitialID);

    //Initialise Banners
    InMobi.initialize(this, myBannerID);

    //Create the banner
    imbanner = new IMBanner(this, myBannerID, IMBanner.INMOBI_AD_UNIT_320X50);
    //60 second interval refresh
    imbanner.setRefreshInterval(60);
    //Load the banner
    imbanner.loadBanner();

    //Callbacks for the banner ads
    imbanner.setIMBannerListener(new IMBannerListener() {
        @Override
        public void onShowBannerScreen(IMBanner arg0) {             
            Log.v("Inmobi","OnShowBannerScreen");               
                }
            @Override
        public void onLeaveApplication(IMBanner arg0) {
                Log.v("Inmobi","Leave Application");
        }
        @Override
        public void onDismissBannerScreen(IMBanner arg0) {
            Log.v("Inmobi","OnDismissBannerScreen");
        }
                @Override
        public void onBannerRequestFailed(IMBanner banner, IMErrorCode errorCode) {
             Log.v("Inmobi","onBannerRequestFailed: "+errorCode);
        }
        @Override
        public void onBannerRequestSucceeded(IMBanner arg0) {
                Log.v("Inmobi","onBannerRequestSucceeded");
                }
                @Override
        public void onBannerInteraction(IMBanner arg0, Map<String, String> arg1) {  Log.v("Inmobi","onBannerInteraction");
        }
    });

        //Interstitials
        inInterstitial = new IMInterstitial(this, myInterstitialID);
        inInterstitial.loadInterstitial();

        inInterstitial.setIMInterstitialListener(new IMInterstitialListener() {
            public void onShowInterstitialScreen(IMInterstitial arg0) {
                Log.v("Inmobi", "Interstitial showing");
            }
            @Override
            public void onLeaveApplication(IMInterstitial arg0) {
                Log.v("Inmobi", "Interstitial leaving Application");
            }
            @Override
            public void onDismissInterstitialScreen(IMInterstitial arg0) {
                Log.v("Inmobi", "Dismissing Interstitial");
                inInterstitial.loadInterstitial();
            }
            @Override
            public void onInterstitialLoaded(IMInterstitial arg0) {
                Log.v("Inmobi", "Interstitial loaded");
            }
            @Override
            public void onInterstitialInteraction(IMInterstitial interstitial, Map<String, String> params) {                
                Log.v("Inmobi", "Interstitial interaction");
            }
            @Override
            public void onInterstitialFailed(IMInterstitial arg0, IMErrorCode arg1) {
                Log.v("Inmobi", "Interstitial failed: "+arg1);
            }
        }); 

解决方案

@zippy is right. This is a known behaviour which we've fixed in the upcoming SDK release (tentatively in the next 10 days).

Disclaimer: I'm from the InMobi team and manage the SDK product for InMobi

这篇关于的InMobi没有得到横幅或​​插页上首次运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆