androidadmobadsinmobi

How to integrate InMobi ads to android App (Using AdMob)


I'm new at advertising stuff, I'm using AdMob to publish advertising with my app. Now i want to add InMobi advertising, but i'm little confused, i registered InMobi and it has android integration informations. Should i integrate the code to my app or is it enough to write App Id, Login Name, Passoword, Secret Key in AdMob Edit Mediation section. if it is enough how can i get these informations. Hope I could explain myself. Thanks in advance.

I use these codes to show advertising :

    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);

Solution

  • Integration of InMobi into AdMob should be pretty simple. Here is the link to the oficial docs. In short, you should download InMobi SDK AND adapter for AdMob from InMobi website (urls are in the AdMob docs), add downloaded SDK and adapter as libraries to your project, make corresponding changes in AndroidManifest.xml (add InMobi's activities, other InMmobi stuff described in the InMobi docs) and enable InMobi option in AdMob console. You should not use your InMobi credentials, all is done through AdMob credentials.