inMobi trouble!

Hey! So I was trying to put inMobi ads in my app, with the following code. Testing on device, though, nothing appears, as no code had been inserted. I have Test Mode set to true.

Ok:
here’s my main:

[code]
_H = display.contentHeight
_W = display.contentWidth

local adNetwork = “inmobi”
local appID = “4028cba633a085920133d2aaa11c04e0”
ads = require “ads”
ads.init( adNetwork, appID )

local director = require(“director”);

local mainGroup = display.newGroup();

local function main ()

mainGroup:insert(director.directorView);

director:changeScene(“scan”);

return true;
end

main();[/code]

Here’s my scene 1

[code]
module(…, package.seeall)

function new()

local localGroup = display.newGroup();

local bg = display.newImageRect(“bgg.png”, _W, _H);
bg:setReferencePoint(display.CenterReferencePoint)
bg.x = _W/2; bg.y = _H/2
bg.scene = “daily”

function changeScene(e)
if(e.phase == “ended”) then
director:changeScene(e.target.scene);

end
end
bg:addEventListener(“touch”, changeScene);
localGroup:insert(bg)

local function showAds()
local adX = display.contentWidth / 2 - 160
ads.show( “banner320x48”, { x=adX, y=0 interval=15, testMode=true } )
end
showAds()
return localGroup
end[/code]

Scene 2:

module(..., package.seeall);  
  
function new()  
 local finger = display.newImageRect("finger.png", 145, 200);  
 finger:setReferencePoint(display.CenterReferencePoint);  
 finger.x = \_W/2; finger.y = \_H/2 + 50  
 finger.scene = "final"  
  
 localGroup:insert(finger)  
  
 local function onTouch(event)  
 local phase = event.phase  
   
 elseif (phase == "ended") then  
 director:changeScene(e.target.scene)  
 end  
 end  
   
 finger:addEventListener("touch",onTouch)  
   
 local function showAds()  
 local adX = display.contentWidth / 2 - 160  
 ads.show( "banner320x48", { x=adX, y=0, interval=15, testMode=true } )  
end  
showAds()  
 return localGroup;   
end  

scene 3

module(..., package.seeall);  
  
function new()  
 math.randomseed(os.time())  
 local localGroup = display.newGroup()  
  
 local bg = display.newImageRect("bgg.png", \_W, \_H);  
 bg:setReferencePoint(display.CenterReferencePoint)  
 bg.x = \_W/2; bg.y = \_H/2  
  
array= {}  
local i = 1  
array[i]= display.newImage("Slide01.png");array[i].alpha=0;i=i+1   
array[i]= display.newImage("Slide02.png");array[i].alpha=0;i=i+1   
array[i]= display.newImage("Slide03.png");array[i].alpha=0;i=i+1   
  
function selectimage()  
local randomimage = math.random(1,#array)  
end   
selectimage()   
  
 localGroup:insert(bg)  
  
local function showAds()  
 local adX = display.contentWidth / 2 - 160  
 ads.show( "banner320x48", { x=adX, y=0, interval=15, testMode=true } )  
end  
 showAds()  
 return localGroup  
end  

Any thoughts?
Thanks! [import]uid: 95495 topic_id: 18329 reply_id: 318329[/import]

I’ve been looking at your code and its an identical match to the code I used in Turkeys Revenge and it is generating and showing ads.

Can you plug you device in and use XCode’s organizer to look for the log files generated on the iPhone/iPad and see if you’re getting any errors.

It could just be they are not providing test ads. I had to play almost 3 levels of my game to get a live ad. But I thought they were doing a better job providing fake ads in test mode.
[import]uid: 19626 topic_id: 18329 reply_id: 70190[/import]

haha that sucks!!!
I’ll try that…thanks for your help rob! [import]uid: 95495 topic_id: 18329 reply_id: 70192[/import]

dont forget to contact inmobi as well via a direct email

ansca@inmobi.com

c. [import]uid: 24 topic_id: 18329 reply_id: 70195[/import]

gustavoschv: Did you get anywhere with this?

I am currently trying to use the “banner320x48” ad size but nothing is showing. The “banner300x250” size works fine. They were both working a week or so ago.

The only difference is in the debug output: the InMobi ad request post body has “mk-ad-slot” set to 9 for 320x48, and 10 for 300x250 [import]uid: 27242 topic_id: 18329 reply_id: 70555[/import]

I didn’t get anywhere yet. No banners show up whatsoever.

inMobi told me this: The site ID you’re using below is in the “Incomplete” state in your InMobi account since you’ve not provided the App Store URL.
While in the incomplete state, you will only receive test ads from our Sandbox server. Please turn on the test mode to enable testing with our Sandbox.

Should I add anything to my code to reach this sandbox? [import]uid: 95495 topic_id: 18329 reply_id: 70665[/import]

In theory:

ads.show( “banner320x48”, { x=adX, y=0, interval=15, testMode=true } )

should be the only thing you need to do to play in the sandbox instead of getting live ads.

FWIW, my fill rate was like 13% today, so if they are not always trafficing ads in the sandbox, you’re may not get them very often.

There is a “test” appId that can also be used. I thought I posted it above. Use it in place of your appID. Guess it was in another thread somewhere.

4028cb962895efc50128fc99d4b7025b

Try that appId and see if it helps get you test ads. You would then switch to your live appId before you send the app off to Apple.

[import]uid: 19626 topic_id: 18329 reply_id: 70669[/import]

I have downloaded the InMobi SDK and done some testing.

The problem with the “banner320x48” seems to be that InMobi is deprecating this size in favour of a 320x50 banner size going forward.
When you connect to their server in test mode it returns:
<<<< ad request failed. >>>>, error=Server returned a no-fill. No action required. error code=3

The InMobi SDK demo app is already set to use this new 320x50 banner size by default.

The following is taken from the “InMobi iOS SDK Installation and Integration Guide” page 8 and clearly states that it will deprecate the 320x48 size.

/\*\*  
\* This ad slot will be deprecated in the future. Use ad slot 15 instead. \* The ad size equivalent to this slot is CGSizeMake(320, 48)  
\*/  
#define IM\_UNIT\_320x48 9  
  
...  
  
/\*\*  
\* Standard rich media ad size for iPhone and iPod Touch.  
\* The ad size equivalent to this slot is CGSizeMake(320, 50) \*/  
#define IM\_UNIT\_320x50 15  

Ansca can we have this new size supported please?
[import]uid: 27242 topic_id: 18329 reply_id: 70715[/import]

Wonder if that is why our fill rates suck? If they are not selling 320x48’s we can’t deliver them.

Yes, we need an answer to this ASAP. [import]uid: 19626 topic_id: 18329 reply_id: 70720[/import]

My fill rate has been down a fair bit too, i’m at 18% on one of my apps today, if it is the case that they are changing the ad size, then ansca need to get on this asap, I’ve heard christmas is a great time to be earning from ad’s and I wouldn’t want to miss out.

Also has anyone had their september payment yet? I got my august one at the end of oct, but nothing at all in November. [import]uid: 36590 topic_id: 18329 reply_id: 70829[/import]

Not only those issues but i have 2 iPad games using inMob and neither of those now show up any ads (728x90), while +1-2wks ago they were working fine.

Right now i have no problems with the 320x48 ad sizes showing upon my apps but it’s good to know they will soon be depreciated - quite troublesome though as now it means having to deliver a new update just to do a new banner size.

As you guys said, no wonder fill rates have dropped so dramatically lately.

Hopefully ansca will come up with an alternative to inmobi in the near future as it is becoming a waste of time to incorporate inmobi ads. [import]uid: 66228 topic_id: 18329 reply_id: 70930[/import]

I represent InMobi’s engineering team.

The issue of ads not being served in sandbox has been fixed sometime back. Now you will be able to get ads consistently when testMode=true.

You can also reach helpdesk@inmobi.com directly for any other queries. [import]uid: 111143 topic_id: 18329 reply_id: 73895[/import]