inMobi trouble!

11 replies [Last post]
gustavoschv
User offline. Last seen 6 years 39 weeks ago. Offline
Joined: 4 Oct 2011

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:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 _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();

Here's my scene 1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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

Scene 2:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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!

Replies

Omnigeek Media
User offline. Last seen 15 weeks 5 days ago. Offline
Joined: 18 Jan 2011

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.

gustavoschv
User offline. Last seen 6 years 39 weeks ago. Offline
Joined: 4 Oct 2011

haha that sucks!!!
I'll try that..thanks for your help rob!

carlos m. icaza
User offline. Last seen 8 years 13 weeks ago. Offline
Alumni
Joined: 22 Jun 2009

dont forget to contact inmobi as well via a direct email

ansca@inmobi.com

c.

toriaezunama
User offline. Last seen 7 years 35 weeks ago. Offline
Joined: 25 Jan 2011

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

gustavoschv
User offline. Last seen 6 years 39 weeks ago. Offline
Joined: 4 Oct 2011

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?

Omnigeek Media
User offline. Last seen 15 weeks 5 days ago. Offline
Joined: 18 Jan 2011

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.

toriaezunama
User offline. Last seen 7 years 35 weeks ago. Offline
Joined: 25 Jan 2011

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.

1
2
3
4
5
6
7
8
9
10
11
/**
* 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?

Omnigeek Media
User offline. Last seen 15 weeks 5 days ago. Offline
Joined: 18 Jan 2011

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.

cbartlett
User offline. Last seen 3 years 29 weeks ago. Offline
Joined: 10 Feb 2011

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.

jacques1
User offline. Last seen 9 weeks 3 days ago. Offline
Joined: 2 Jun 2011

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.

lohith2
User offline. Last seen 7 years 42 weeks ago. Offline
Joined: 14 Dec 2011

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.

Viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.