0

我想知道当应用在安卓设备上启动时如何显示亚马逊插页式广告。

我努力了...

AdRegistration.setAppKey(APP_KEY); this.interstitialAd = new InterstitialAd(this); this.interstitialAd.loadAd(); this.interstitialAd.setListener(this); 在 OnCreate 下,但广告不会出现

4

1 回答 1

0

通过在清单中将其声明为启动器来创建启动器活动,以显示您的兴趣

制作一个处理程序并使用 postdelayed 开始您的主要活动

@Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        // do not set contentView 
        Your Interestial logic goes here  


      //set up a handler to start main activity   
    Handler handler = new Handler();
    handler.postDelayed(new Runnable() {

        @Override
        public void run() {     

                Intent intent = new Intent(Splash.this,HomeActivity.class);             
                intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP
                        | Intent.FLAG_ACTIVITY_NEW_TASK);
                startActivity(intent);
                finish();

        }

    }, 4000);

}

于 2014-07-20T18:29:36.877 回答