androidadmobadsadwhirl

How to integrate Inmobi with Adwhirl and Admob in android


I already used admob 4.3.1 with ad-whirl in my android application...but i want to use Inmobi too...but I don't know if i must change something in my code...i read that inmobi reqiure Adwhirl 3.0.0 sdk...but i'm using 3.1.1 with admob... any help please...

i put the 3 SDKs...used the needed Permissions,, Declaring these two activites:

   <activity android:name="com.google.ads.AdActivity"         android:configChanges="keyboard|keyboardHidden|orientation"/>
    <!-- Mandatory activity declaration to show the Ad in the embedded browser -->
   <activity android:name="com.inmobi.androidsdk.IMBrowserActivity"
        android:configChanges="keyboardHidden|orientation|keyboard" />

and this in my activity:

 LinearLayout adLayout = (LinearLayout) findViewById(R.id.ads);
    AdWhirlLayout adWhirlLayout = new AdWhirlLayout(this, "Key");
    RelativeLayout.LayoutParams adWhirlLayoutParams = new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT,
    LayoutParams.WRAP_CONTENT);
    adLayout.addView(adWhirlLayout, adWhirlLayoutParams);

Solution

  • If you look at the AdWhirl change log, you can see that AdWhirl 3.1.1 has support for the latest InMobi SDK, which is currently v300. If you have AdWhirl 3.1.1, make sure you're using the latest InMobi SDK.

    On another note, if you are using AdMob 4.3.1, you'll need to update your activity declaration to:

    <activity android:name="com.google.ads.AdActivity"
              android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
    

    If you are having issues with the above code, please check out this blog post for more information on how to migrate to v4.3.1 of the AdMob SDK. This information is just as relevant if you are using AdMob with AdWhirl.

    Your Java code which defines your layout is correct, assuming you are using the right app key. Nothing else should be needed to get InMobi working other than their latest SDK.