【发布时间】:2014-05-19 03:58:39
【问题描述】:
我是广告方面的新手,我正在使用 AdMob 通过我的应用发布广告。现在我想添加 InMobi 广告,但我有点困惑,我注册了 InMobi,它有 android 集成信息。我应该将代码集成到我的应用程序中,还是在 AdMob Edit Mediation 部分中编写 App Id、Login Name、Passoword、Secret Key 就足够了。如果足够了,我怎么能得到这些信息。希望我能解释一下自己。提前致谢。
我使用这些代码来展示广告:
adView = new AdView(MainActivity.this);
adView.setAdSize(AdSize.SMART_BANNER);
adView.setAdUnitId("MY_ID");
LinearLayout layout = (LinearLayout) findViewById(R.id.adv);
layout.addView(adView);
final TelephonyManager tm = (TelephonyManager) getBaseContext()
.getSystemService(Context.TELEPHONY_SERVICE);
String deviceid = tm.getDeviceId();
AdRequest adRequest = new AdRequest.Builder()
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
.addTestDevice(deviceid).build();
// Start loading the ad in the background.
adView.loadAd(adRequest);
【问题讨论】: