here is the code I have been using in my apps. i know it works but as everyone is saying… with he test codes its hit or miss if you actually see them in your “test app” but i do know when i switch this over to my live app codes and go live… it works.
IOS i get decent fill rates. Android… not so much. but thats not the codes fault…
[lua]local ads = require “ads” – Required for Banner Ads
–*********************************************
–***** Setup Banner Ads
–*********************************************
if (platformCheck == “Android” or platformCheck == “Win”) then
–ads.init( “inmobi”, “your real Android INMOBI code here” ) --Android InMobi Code
ads.init( “inmobi”, “4028cb962895efc50128fc993f9f025a” ) --Android TEST CODE
print (“InMobi Initialized for ANDROID”)
analytics.init(“Enter your real ANDROID FLURRY code here”) – init Flurry Analytics for the app at the same time
print (“Flurry Initialized for ANDROID”)
else
–ads.init( “inmobi”, “your actual IOS INMOBI code here” ) --IOS InMobi Code
ads.init( “inmobi”, “4028cb962895efc50128fc99d4b7025b” ) --IOS TEST CODE
print (“InMobi Initialized for IOS”)
analytics.init(“Enter your real IOS FLURRY code here”)
print (“Flurry Initialized for IOS”)
end
analytics.logEvent(“Launched Game”)
print("Width ",display.contentWidth)
print("Height ",display.contentHeight)
if display.contentWidth > 468 then – Pick which size banner i want to use based on device screen width.
if display.contentWidth > 728 then
bannerWidth = 728 – Width that fits on Larger Tablets (iPads and Xoom)
bannerHeight = 90
–bannerWidth = 468 – disabled the other ads, to see if this size gets better fill rates and banners on a Xoom.
–bannerHeight = 60
else
bannerWidth = 468 – Width that fits on smaller tablets (Galaxy Tabs / Kindle Fire)
bannerHeight = 60
end
else
bannerWidth = 320 --Width of smallest Phone Screen
bannerHeight = 48
end
print ("Global Banner Width set to : ",bannerWidth)
print ("Global Banner Height set to: ",bannerHeight)
print ("Inmobi Banner to show: ",“banner”…bannerWidth…“x”…bannerHeight)[/lua] [import]uid: 67604 topic_id: 18289 reply_id: 70096[/import]