0

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);
Eric Leichtenschlag
  • 8,881
  • 1
  • 28
  • 28
Reham
  • 1,916
  • 6
  • 21
  • 45

1 Answers1

0

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.

Eric Leichtenschlag
  • 8,881
  • 1
  • 28
  • 28
  • Thanks Eric,,i don't have an issue with admob...but i do with inmobi...No ads ..and this is the log 01-13 15:29:09.956: E/AdWhirl SDK(10575): Unable to parse response from JSON. This may or may not be fatal. 01-13 15:35:27.531: E/AdWhirl SDK(26735): org.json.JSONException: Value [] of type org.json.JSONArray cannot be converted to JSONObject . . 01-13 15:30:40.214: I/AdWhirl SDK(10575): Sum of ration weights is 0 - no ads to be shown – Reham Jan 13 '12 at 13:42
  • There are two reasons for that error. It can happen if the AdWhirl servers go down, but to my knowledge, the servers didn't go down yesterday. It could also happen if somehow the json coming from your app is configured incorrectly. Do your percentages in the AdWhirl UI add up to 100%, and are all the ad networks configured properly? – Eric Leichtenschlag Jan 13 '12 at 18:36
  • I'm just using 2 adNw right now...Admob and it works fine...and inmobi which fires this Exc..i put the percentage 50% for each one... – Reham Jan 13 '12 at 19:38
  • Ok, well if InMobi is throwing this exception (and AdMob isn't), then it is not a problem retrieving your config from the server, and I think it has to be the way you are setting up the configuration in AdWhirl. Would you mind providing your SDK key? – Eric Leichtenschlag Jan 13 '12 at 21:25