Welcome to inneractive

225 replies [Last post]
orly's picture
orly
User offline. Last seen 22 hours 19 min ago. Offline
Joined: 7 Dec 2011

I would like to personally welcome all of you to inneractive.
Many developers who are using inneractive have generated substantial revenue from their free apps, you will too!

My name is Orly Tsesis and I will be your dedicated Personal Account Manager at inneractive.

In case you have missed that - here is a link with all the explanations on how to integrate inneractive into your apps

http://developer.anscamobile.com/reference/ads-inneractive

Feel free to ping me with any questions you may have.

Replies

KenRogoway's picture
KenRogoway
User offline. Last seen 6 hours 56 min ago. Offline
Joined: 17 Jan 2011

Orly,

We need to have a notification when a Full Screen ad is dismissed. Currently we do not have any notification except for a listener when an ad is displayed.

The problem with this is that we want to show a full screen ad prior to our level starting, but our level has a timer that gets set when the scene is loaded. Since we kick off that ad in our scene, our timer is counting down while they look at the ad. This makes showing a full screen ad at the start of the level no feasible.

Other than this one item we are ready to submit to Apple, so can you please work with Ansca to get a listener added when an ad is dismissed?

Thanks!

orly's picture
orly
User offline. Last seen 22 hours 19 min ago. Offline
Joined: 7 Dec 2011

Hey Ken, I will forward this to our support department and keep you posted. But I think you can have the full screen ad after the first screen of the app and before the user chooses to click to start playing the app - this way you wont have the problem with the count-down. Also do you have this issue in between levels (countdown) or only in the beginning of the game?

saidul.islam
User offline. Last seen 11 weeks 3 days ago. Offline
Joined: 20 Mar 2011

ok this is really messed up! I signed up but when I went to type in the payment detail (Bank Account information), I noticed the page isn't using SSL. If they are so good and big as they say they should have taken care of this on day 1

-SI

BenM
User offline. Last seen 1 day 10 hours ago. Offline
Joined: 26 Jan 2011

Hi,

I sent an email, but thought others may be interested in this too, so here it is again.

I am trying out Inneractive ads in a corona game which runs in landscape mode.

I have it set like this:
ads.show( "banner", { x=0, y=0, interval=60 } )

Unfortunately it seems to ignore the location data and instead displays the ad centred in a black bar at the top of the screen. Is there a way to get rid of the the black bar as this just does not look right or good?

Thanks,
Ben

saidul.islam
User offline. Last seen 11 weeks 3 days ago. Offline
Joined: 20 Mar 2011

Well I am using portrait mode and I also see black/empty space on both sides of the app. it doesn't look that bad on mine but yes it is annoying. question for you, are you getting the non-SSL page during the payment information setup?

-SI
Follow me @saidulislam

BenM
User offline. Last seen 1 day 10 hours ago. Offline
Joined: 26 Jan 2011

I have not set the payment details part up yet as I had created the account weeks ago, but you are right the page is a non SSL page.
I believe it is still possible to encrypt the actual transfer even if it is not an SSL page as such. Inneractive would need to confirm that this is the case and that it is taking place.

Ben

@RSCdev's picture
@RSCdev
User offline. Last seen 2 hours 46 min ago. Offline
Joined: 6 Sep 2011

Is it necessary SSL when you set your payment method for Paypal?

Cheers,
Rodrigo.

BenM
User offline. Last seen 1 day 10 hours ago. Offline
Joined: 26 Jan 2011

I did not even look at the payment options as I am not ready to set this part up, but I would say yes, paypal should be ok regardless of SSL or not, as it is just an email account reference.

Ben

saidul.islam
User offline. Last seen 11 weeks 3 days ago. Offline
Joined: 20 Mar 2011

Yes. don't type in anything personal without the SSL. if not, you will be sending out plain text that can be intercepted and seen clearly by anyone interested

-SI

shane.lipscomb's picture
shane.lipscomb
User offline. Last seen 6 days 7 hours ago. Offline
Joined: 26 May 2011

Hey Orly,

Ken's issue just became mine as well. As you will recall, and to bring everyone up to speed, we "spoke" via email about another Corona/inneractive issue earlier this week, where multitouch was disabled below inneractive ads. Your response was this was a Corona issue (which I don't dispute), but you also had some recommendations for alternate ad usage. The best prospect was/still seems to be using the full screen ad. Here's the problem now, and how it relates to Ken's issue, above.

If I display a full screen ad between rounds/ levels of my game, I have to (using Corona's API's) "show the ad". No problem. It shows, and if the player chooses not to click the ad the player can skip after a few seconds. Now we are back to gameplay, but, just like with the banners, multitouch no longer works. Now, I could call the API/code to "hide" the ad when it was finished showing, but unless I receive a notice that this is the case, I am reliant upon using a timer to indicate when the ad would be skippable, and then hide the ad manually (within the code) which should clear the multitouch hang-up. This will, of course, cause the ad to immediately dissapear. I must set the timer to do so after the shortest possible amount of time, as to not would cause anyone who did skip it as quickly as possible to encounter the multitouch issue.

But to assume that the ad will be skipped as soon as possible every time belies the chance that someone may actually be considering the ad, and given time, may choose to click it. Which is what we all want. But now the ad disappears before the player can commit to the click, and we all lose in that scenario.

I just keep running into roadblocks while trying to incorporate inneractive. I understand that this too may be a Corona-side issue, but either someone steps up and commits to these fixes, or interactive will not be the choice of more and more Corona developers as they find they cannot reasonably design around these issues and still maintain the integrity of their game.

saidul.islam
User offline. Last seen 11 weeks 3 days ago. Offline
Joined: 20 Mar 2011

all credit or personal information submission must require SSL. It's 101 for any transactional site.

-SI

KenRogoway's picture
KenRogoway
User offline. Last seen 6 hours 56 min ago. Offline
Joined: 17 Jan 2011

@shane,

Well said! That is exactly the issue I am facing too. Without this resolved there is no point in using Full Screen ads during a game session for the very reasons you so clearly wrote about.

The only place that Full Screen ads are useful is when a player is sitting at a main menu (if your game has one) and there is no expectation they will do any particular action.

Ansca, please address this ASAP so we can leverage off the great pay-rates and fill-rates that Inneractive offers.

@RSCdev's picture
@RSCdev
User offline. Last seen 2 hours 46 min ago. Offline
Joined: 6 Sep 2011

I am using paypal and when I set that I`ve just used my personal mail as it is the unique thing paypal`s request.

However without SSL I would not insert any of my credit card, address, etc into IMO btw.

Cheers,
Rodrigo.

mobilefun4me's picture
mobilefun4me
User offline. Last seen 1 day 15 hours ago. Offline
Joined: 26 Apr 2010

Pre-school Age Group

I have an app designed for early childhood development. Could you expand the age group to include pre-school and early elementary?

peach pellen's picture
peach pellen
User offline. Last seen 1 day 12 hours ago. Offline
Staff
Joined: 12 Apr 2011

I've been using inneractive in one of my apps for almost a month now and am loving it.

There's always going to be a few hiccups in the early days but those will be resolved.

Peach :)

orly's picture
orly
User offline. Last seen 22 hours 19 min ago. Offline
Joined: 7 Dec 2011

Payment details -

For developers that are using PayPal - the page doesn't have to be encrypted as all you need to enter is your email address.

The payment transfer is not made through the dashboard but through secured transactional program - so no need to worry about that.

shane.lipscomb's picture
shane.lipscomb
User offline. Last seen 6 days 7 hours ago. Offline
Joined: 26 May 2011

@Peach, Thank you. It was actually your posting of your positive experience with inneractive full-screen ads on another thread that convinced me to put the effort into tweaking my game to accommodate them.

@Ken, I think I may have a workaround for the multi-touch issue, at least one that will work for my game, and I will post details once I confirm.

oleglat
User offline. Last seen 4 weeks 5 days ago. Offline
Joined: 22 Sep 2011

Guys / Gals:

I'm trying to implement inneractive into my game. I get the code and all, but since it is not supported in the simulator, what is the best way to test it,or must I constantly upload into my Droid?

Thanks,
Oleg

robmiracle's picture
robmiracle
User offline. Last seen 7 hours 50 min ago. Offline
Joined: 18 Jan 2011

Or to your device simulator.

KenRogoway's picture
KenRogoway
User offline. Last seen 6 hours 56 min ago. Offline
Joined: 17 Jan 2011

@Orly or Peach,

I am trying to understand why we should use the Full Screen ads. They just give us the same sized ad in the center of the screen with a white background and a Skip button that doesn't work 1/2 the time.

In fact on 3 different iPads it locks up 50% of the time (the SKIP button doesn't skip even if it had counted down to 0). The only way to get it working on these machines is to do a full reboot of the iPads.

Since we don't have an event on close, and since full screen ads lock up 50% of the time, why would we want to use this mode?

shane.lipscomb's picture
shane.lipscomb
User offline. Last seen 6 days 7 hours ago. Offline
Joined: 26 May 2011

Okay, regarding the multi-touch issue with inneractive ads, as related above, and my workaround:

I figured that I could capture the very next touch event in the game and call ads.hide(). This clears the ad only after the player has skipped through. Once the ads.hide function is called, this particular multi-touch issue resolves itself. But I was still aware of the potential disruption to the gameplay if the player's first move was to initiate a multi-touch gesture. So I opted to call up our game's pause menu (under the ad) when I called the ad. This way, the player is presented with the pause menu, presses "resume," a single-touch event, and the pause menu's exit function also calls the ads.hide function.

This may actually work out in another way. I was looking for a way to draw the player's attention to certain other things, like our in-app purchase options, a call to rate the app, etc. These messages I can now incorporate into the pause screen, with a "Did you know" sort of approach.

This may work for this app, this time, but please don't let that delay the fix that I am sure is coming. Right Ansca?

KenRogoway's picture
KenRogoway
User offline. Last seen 6 hours 56 min ago. Offline
Joined: 17 Jan 2011

@Shane,

Sounds like you have a workable fix for your game and that's good. Unfortunately that doesn't fix the issue for our app.

I think the best solution is for us to implement our own version of the full screen ad. Basically do what they are doing by drawing a white background (or whatever color you want) with an event listener to handle tap/touch events. Then call ads.show() with a position to center the ad. After whatever delay we want we can call ads.hide() and remove the white background.

[begin rant]
What I don't understand is why Ansca isn't fixing this issue but continues to push Inneractive ads. Ansca, if you want us to use Inneractive (and trust me, I DO want to use it), then please fix the bugs that have been reported with it.
[end rant]

robmiracle's picture
robmiracle
User offline. Last seen 7 hours 50 min ago. Offline
Joined: 18 Jan 2011

Well I can't speak for the skip button not working. That was supposedly fixed.

But the answer "Why" is pretty straight forward. If you have a game, your players are focused on game play and you're spitting ads at them they won't engage with.

If you use what is called "Interstitial Ads" in ad speak, ads that show up in between activities, then the player is more likely to engage with the ad and click through on it it. The higher your click rate, the better your revenue will be.

While I think a blank screen with a small banner doesn't look that good, perhaps at some point, when inneractive is selling more full screen inventory, they can get better creatives than just the banners that we currently have.

One full screen albeit a banner every couple of levels should make you more money than a 30 second during play rotation.

shane.lipscomb's picture
shane.lipscomb
User offline. Last seen 6 days 7 hours ago. Offline
Joined: 26 May 2011

EDIT: and that is what happens when you like to write long posts. EVERYONE beats you to the punch :)

@ Ken,

I haven't encountered the locking up issue yet. That would be the final straw for me, regarding inneractive. But to the other issue:

The full screen ad creates a stop and focus moment. Yes, it takes the player out of the game. We hesitate to do so to a valued customer. But then again, they got this app for free, and their value to us is ultimately performing an act that makes us money. Which, in this case, means click that ad.

When an ad appears in a banner during gameplay, players may see it, but they are unlikely to truly focus on it, and most users form ad blindness over time. Plus, if they do click, they are taken out of the gameplay anyways.

I get that some players may chose to delete the game rather than put up with the ads, but, really, the number of players that would reject an app with full screen ads, but both tolerate AND click on a banner ad, must be a small minority indeed.

Of course, you could do the following: since the ads are, so far at least, only banner ads on a white background, why not create your own full-screen ads using inneractive banners and your own background screen, skip buttons, and own the look and functionality of it all? Hmm. I got some coding to do...

KenRogoway's picture
KenRogoway
User offline. Last seen 6 hours 56 min ago. Offline
Joined: 17 Jan 2011

@robmiracle,

You misunderstood. I WANT to use Full Screen ads. I am going to use full screen ads. I just cannot use it if the ad gets stuck, and would have to implement it myself (which isn't hard).

Interstitial ads are definitely the preferable way to show ads. Never said it wasn't.

I'll check the daily build notes and see if there is something about the Skip hang being fixed.

Ken

KenRogoway's picture
KenRogoway
User offline. Last seen 6 hours 56 min ago. Offline
Joined: 17 Jan 2011

@Shane,

If you read above your post that is exactly what I said I was going to do. Most likely you were still writing your post when mine went up.

shane.lipscomb's picture
shane.lipscomb
User offline. Last seen 6 days 7 hours ago. Offline
Joined: 26 May 2011

@Ken, yeah I got that, hence my edit. It must be a good sign if all of us come to the same conclusion at the same time, right?

saidul.islam
User offline. Last seen 11 weeks 3 days ago. Offline
Joined: 20 Mar 2011

i am using it now with my android app but I am not happy with the whole experience. it works sometimes. the ad wasn't coming up in the afternoon or earlier this evening. it's coming up now but it keeps showing just one ad (audible)

-SI

saidul.islam
User offline. Last seen 11 weeks 3 days ago. Offline
Joined: 20 Mar 2011

*This message is for Orly or "inneractive" only, not for Peach*

That's lame. seriously, you should take it to your higher management and discuss implementing SSL asap. this is not only bad for your company's image but it also reflects negative on Ansca management team too. No one from Ansca management probably would say/criticize about it openly here but have a little chat with them about it if you haven't done so and I have a good hunch they would be cringing about it. I understand there can technical/logistical issues being new but to deny/cover such thing with sugar coating is wrong.

ok I am believing the transaction is secure when you transfer fund from your institution to our banks but the transaction that we are submitting with our personal/sensitive information from browser to your system is not secured. Providing encrypted transaction is NOT our/users' responsibility, it's yours (inneractive)

My intention here is not to argue or pick a fight. I see what's blatantly wrong and I pointed that out so you could prompt action.

-SI

peach pellen's picture
peach pellen
User offline. Last seen 1 day 12 hours ago. Offline
Staff
Joined: 12 Apr 2011

@Ken - how are you going with the latest daily build?

I haven't actually had any issues with the skip button, although so far I've only used it in iPhone apps, no iPad.

Any bugs filed will be looked at and solved; there is a big scramble after the holiday break but obviously things like this are a priority.

@Saidul - You really don't need to specify your post is "Not to Peach" ;)

KenRogoway's picture
KenRogoway
User offline. Last seen 6 hours 56 min ago. Offline
Joined: 17 Jan 2011

@Peach,

The latest daily build didn't have any build notes regarding a fix for the Skip issue so I didn't install it. Let me know if they forgot to list that as a bug fix and I'll give it a try.

peach pellen's picture
peach pellen
User offline. Last seen 1 day 12 hours ago. Offline
Staff
Joined: 12 Apr 2011

Ken, you're correct - I just looked and see no notes.

I'm going to try and chase this up in the morning although being the weekend I may not be able to get back to you as quickly as I'd like.

Do you happen to have a bug number for the issue to hand? (If not that's fine, I'll scour fogbugz before sending off an email about this.)

Thanks,
Peach :)

robmiracle's picture
robmiracle
User offline. Last seen 7 hours 50 min ago. Offline
Joined: 18 Jan 2011

If it was a fix at inneractive, it probably would not show up in the daily build release notes.

KenRogoway's picture
KenRogoway
User offline. Last seen 6 hours 56 min ago. Offline
Joined: 17 Jan 2011

@rob,

I don't see how Inneractive could fix code in a Corona game remotely unless the Full screen ad is just a full screen web pop up.

peach pellen's picture
peach pellen
User offline. Last seen 1 day 12 hours ago. Offline
Staff
Joined: 12 Apr 2011

Hey guys - I'm not certain which side needed to fix what but I will try to chase it up Monday morning. (Until then, Orly may know.)

Hope you're both having a nice weekend!

Peach :)

orly's picture
orly
User offline. Last seen 22 hours 19 min ago. Offline
Joined: 7 Dec 2011

@ saidul.islam
I appreciate you pointing out things for improvement - I do believe that there is a way of saying everything as we are on the same side and try to bring the best for our developers.

I did talk with our team at inneractive and they pointed out something that I did not know :)
We use an ifram inside the page which is 100% SSL!

So now, you can be positively sure that it is safe to add your payment details to the website :)

orly's picture
orly
User offline. Last seen 22 hours 19 min ago. Offline
Joined: 7 Dec 2011

Hey mobilefun4me,

Ad-netowrks and agencies are not targeting these groups as they are too young to make purchases/read/understand banners.

If your application includes also the parents of the children (like reading a book) or some activity that they do together - than age group should be of the parents.

orly's picture
orly
User offline. Last seen 22 hours 19 min ago. Offline
Joined: 7 Dec 2011

Shane and Ken,

Creating your own full screen ad is a GREAT idea and if you have the ability this is something that you should do.
I can give you an example of Android developer who animated the banners in a really nice way - https://market.android.com/details?id=com.pocketeers.funkycam3d&hl=en

Another reason why we are pushing full screen ads is because by the end of Q1 we are going to implement the rich media ads in the full screen ads. These ads generate much higher eCPM - http://blog.inner-active.com/2011/09/inneractive-goes-interactive-with-10-global-rich-media-mobile-ad-partners/

KenRogoway's picture
KenRogoway
User offline. Last seen 6 hours 56 min ago. Offline
Joined: 17 Jan 2011

@Orly,

I was able to implement my own full screen ad and it resolves the hang with the one currently in Corona. Aside from dealing with the lock up it also allows me to know when the screen is dismissed.

Naomi's picture
Naomi
User offline. Last seen 6 hours 53 min ago. Offline
Joined: 6 Jun 2011

Hey, Ken, I'm wondering if you could share your code that enabled your own full screen ad. I'd very much interested in seeing it.

Naomi

orly's picture
orly
User offline. Last seen 22 hours 19 min ago. Offline
Joined: 7 Dec 2011

Hey Ken,

Can you please send me the code to my email - orly@inner-active.com
It will be great to see it and test it here.

Thank you very much!

dirtyBit
User offline. Last seen 22 hours 24 min ago. Offline
Joined: 5 Sep 2011

Hi,

I'm having the same problem as Ben, did anyone find a solution?
This is only a problem with Android.

Quote:
"I am trying out Inneractive ads in a corona game which runs in landscape mode.

I have it set like this:
ads.show( "banner", { x=0, y=0, interval=60 } )

Unfortunately it seems to ignore the location data and instead displays the ad centered in a black bar at the top of the screen. Is there a way to get rid of the the black bar as this just does not look right or good?"

BenM
User offline. Last seen 1 day 10 hours ago. Offline
Joined: 26 Jan 2011

@dirtyBit - I have not heard any response on here or from the email that I sent.

@Orly, is this being looked at? Some response would be nice.

Ben

KenRogoway's picture
KenRogoway
User offline. Last seen 6 hours 56 min ago. Offline
Joined: 17 Jan 2011

@Orly,

I'll post a solution to the hanging full screen issue when I get home tonight. I'll also email you a copy per your request.

Ken

KenRogoway's picture
KenRogoway
User offline. Last seen 6 hours 56 min ago. Offline
Joined: 17 Jan 2011

Here you go:

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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
---------------------------------------------------------------------------------------
-- Inneractive wrapper class
--
-- File name: cInneractive.lua
--
-- Usage:
--      inneractive = require("cInneractive")
--      APP_ID = "MY_Inneractive_App_ID"    -- use your app id here
--      inneractive.Init( APP_ID )
--      inneractive.Show()                  -- no parameters required, will call Hide in 5 seconds
-- or:
--      inneractive.Show{
--          cnt_text="You can skip in",
--          skip_time=10,
--          skip_text="Tap to skip Advertisments"
--          }
--
-- If you have called Show(), but need to explicitly close the ad, you can do this to
-- clean everything up:
--
--      inneractive.Hide()
--
---------------------------------------------------------------------------------------
module(..., package.seeall)
 
local ads = require "ads"
 
local isSimulator = system.getInfo( "environment" ) == "simulator"
local fontScaleX = display.contentWidth/1024
local fontScaleY = display.contentHeight/769
-- Objects needed here for cleanup
local adInfo = {}
 
-- Forward references
local adSkipListener, adSkipGobbler
 
-- *******************************************************************************************
-- Init()
--
-- Initialize the Ad system
-- Parameters:
--      appId           Your Inneractive app ID
--      onAdDisplayed   Event callback called when
--                      ad is displayed
-- *******************************************************************************************
function Init( appId, onAdDisplayed )
    if ( isSimulator ) then
        adInfo.theAdShowCallback = onAdDisplayed
        print( "ads.init() cannot be called in the simulator" )
    else
        adInfo.theAdShowCallback = nil  -- Use their callback via the ads system
        ads.init( "inneractive", appId, onAdDisplayed )
    end
end
 
-- *******************************************************************************************
-- Hide()
--
-- Removes the ad and all of the display objects we created for the ad.
-- *******************************************************************************************
function Hide()
    if ( isSimulator ) then
        print( "ads.hide() cannot be called in the simulator" )
    else
        -- Hide the ad
        ads.hide()
    end
    
    if ( adInfo.timer ) then
        timer.cancel( adInfo.timer )
        adInfo.timer = nil
    end
    
    -- Now cleanup our objects
    if ( adInfo.text ) then
        adInfo.text:removeEventListener( "tap", adSkipListener )
        adInfo.text:removeEventListener( "touch", adSkipListener )
        -- We don't really need to do this here since the group remove will handle it, but
        -- since we are already cleaning up the event listeners we might as well remove it.
        adInfo.text:removeSelf()
        adInfo.text = nil
    end
    if ( adInfo.backImage ) then
        adInfo.backImage:removeEventListener( "tap", adSkipGobbler )
        adInfo.backImage:removeEventListener( "touch", adSkipGobbler )
        -- We don't really need to do this here since the group remove will handle it, but
        -- since we are already cleaning up the event listeners we might as well remove it.
        adInfo.backImage:removeSelf()
        adInfo.backImage = nil
    end
        
    if ( adInfo.group ) then
        adInfo.group:removeSelf()
        adInfo.group = nil
    end
end
 
-- local function to gobble all tap/touch events for the background
function adSkipGobbler( event )
        return true
end
 
-- local function to invoke hiding the ad
function adSkipListener( event )
    if ( adInfo.skip_time == 0 ) then
        timer.performWithDelay( 50, Hide, 1 )
    end
        return true
end
 
-- *******************************************************************************************
-- Show( params )
--
-- Parameters:
--      params.x         [Optional] background x position (Default is 0)
--      params.y         [Optional] background y position (Default is 0)
--      params.w         [Optional] background width (Default is display.contentWidth)
--      params.h         [Optional] background height (Default is display.contentHeight)
--      params.color     [Optional] background color (Default is { 255,255,255,255 } )
--      params.interval  [Optional] interval to refresh ads (Default is 60)
--      params.skip_text [Optional] Text to show user they can skip the ad (Default is "Tap to Skip")
--      params.skip_font [Optional] Font used for skip_text (Default is native.systemFont)
--      params.skip_time [Optional] Time (in seconds) before the Skip is active (Default is 5)
--      params.cnt_text  [Optional] Text to show user during the countdown (Default is "Skip in")
--
-- NOTES:
--      If params.skip_time is 0 then the skip_text will be used as is.  However, if
--      skip_time is > 0 then the seconds remaining will be appending to the cnt_text
-- *******************************************************************************************
function Show( params )
    -- we have no required parameters so we need to handle passing in nothing
    if ( params == nil ) then
        params = {}
    end
    
    local back_x = params.x or 0
    local back_y = params.y or 0
    local back_w = params.w or display.contentWidth
    local back_h = params.h or display.contentHeight
    local ad_interval = params.interval or 60
    local cnt_text = params.cnt_text or "Skip in"
    local skip_text = params.skip_text or "Tap to Skip"
    local skip_font = params.skip_font or native.systemFont
    local skip_time = params.skip_time or 5
    local back_color = { 255, 255, 255, 255 }
    local banner_width, banner_height
    
    if ( params.color ) then
        for i=1,#params.color do
            back_color[i] = params.color[i]
        end
    end
    
    -- our group to draw to
    adInfo.group = display.newGroup()
    
    -- save off values we will need later
    adInfo.cnt_text = cnt_text
    adInfo.skip_text = skip_text
    adInfo.skip_time = skip_time
    adInfo.timer = nil
       
    -- These banner sizes are from Inneractive for the iPhone/iPad.  If
    -- you have different devices you can add a check based on sysModel
    if ( math.round( display.contentWidth/display.contentScaleX ) > 480 ) then
        banner_width = math.round( 766*display.contentScaleX )
        banner_height = math.round( 66*display.contentScaleY )
    else
        banner_width = 320
        banner_height = 53
    end
    
    -- Center the ad in the background rect
    local ad_x = back_x + math.round( 0.5*( back_w - banner_width ) )
    local ad_y = back_y + math.round( 0.5*( back_h - banner_height ) )
    
    adInfo.backImage = display.newRect( back_x, back_y, back_w, back_h )
    adInfo.backImage:setFillColor( back_color[1], back_color[2], back_color[3], back_color[4] )
    
    adInfo.group:insert( adInfo.backImage )
    adInfo.backImage:addEventListener( "tap", adSkipGobbler )
    adInfo.backImage:addEventListener( "touch", adSkipGobbler )
    
    if ( isSimulator ) then
        -- These will get cleaned up when the adInfo.group is cleaned up
        local dummy_ad = display.newRoundedRect( 0, 0, banner_width, banner_height, 8 )
        dummy_ad:setFillColor( 0, 0, 0 )
        dummy_ad:setReferencePoint( display.TopLeftReferencePoint )
        dummy_ad.x = ad_x
        dummy_ad.y = ad_y
        adInfo.group:insert( dummy_ad )
        
        local dummy_text = display.newText( "Dummy Ad", 0, 0, native.systemFont, math.round( 32*fontScaleY ) )
        dummy_text:setTextColor( 255, 255, 255 )
        dummy_text:setReferencePoint( display.CenterReferencePoint )
        dummy_text.x = display.contentCenterX
        dummy_text.y = display.contentCenterY
        adInfo.group:insert( dummy_text )
    end
    
    local textToUse
    if ( skip_time > 0 ) then
        textToUse = string.format( "%s %d", cnt_text, skip_time )
    else
        textToUse = skip_text
    end
    
    adInfo.text = display.newText( textToUse, 0, 0, skip_font, math.round( 32*fontScaleY ) )
    adInfo.text:setTextColor( 0, 0, 0 )
    adInfo.text:setReferencePoint( display.BottomCenterReferencePoint )
    adInfo.text.x = display.contentCenterX
    adInfo.text.y = display.contentHeight - 4
    adInfo.text:addEventListener( "tap", adSkipListener )
    adInfo.text:addEventListener( "touch", adSkipListener )
    
    adInfo.group:insert( adInfo.text )
    
    if ( isSimulator ) then
        print( "ads.show() not supported in the simulator" )
        if ( theAdShowCallback ) then
            -- Since we aren't using the actual ad system,
            -- so fake it with a callback
            theAdShowCallback()
        end
    else
        ads.show( "banner", { x=ad_x, y=ad_y, interval=ad_interval } )
    end
    
    local function updateText( event )
        adInfo.skip_time = adInfo.skip_time - 1
        if ( adInfo.skip_time > 0 ) then
            adInfo.text.text = string.format( "%s %d", adInfo.cnt_text, adInfo.skip_time )
        else
            adInfo.text.text = adInfo.skip_text
        end
    end
    
    if ( skip_time > 0 ) then
        -- Since we are using skip_time in seconds, that means we can use
        -- skip_time for the number of times to perform this timer event
        adInfo.timer = timer.performWithDelay( 1000, updateText, skip_time )
    end
end

Naomi's picture
Naomi
User offline. Last seen 6 hours 53 min ago. Offline
Joined: 6 Jun 2011

Hey, Ken, thank you so much for sharing!

Naomi

KenRogoway's picture
KenRogoway
User offline. Last seen 6 hours 56 min ago. Offline
Joined: 17 Jan 2011

@Orly,

I just updated the above code to properly handle gobbling up the input for the background.

I've sent you a new .lua file.

Ken

Luciane's picture
Luciane
User offline. Last seen 2 weeks 6 hours ago. Offline
Joined: 31 Jan 2011

I've implemented inneractive in the exact way described but the ads don't show in my test build for iPad.

Does the app name that shows under the icon name on iPad need to be exactly the same used for adding it and getting the app id in inneractive?

If for example I used Sample as app name for innercative appID registration, must my app also be called Sample in the iPad build or could it be called SampleA?

thanks, Luciane

KenRogoway's picture
KenRogoway
User offline. Last seen 6 hours 56 min ago. Offline
Joined: 17 Jan 2011

@Luciane,

Did you register with Inneractive and set up your app? You will be given an app ID from them to use. Basically it's a string based on whatever name you give it, with spaces changed to underscore characters.

So if you register and set up an app named "Sample" for iPad your app ID might be:

"YourCompany_Sample_iPad"

Hope that helps.

Ken

Luciane's picture
Luciane
User offline. Last seen 2 weeks 6 hours ago. Offline
Joined: 31 Jan 2011

Thanks Ken. yes I did it all like that and got an appId like that. However with so many builds it gets very confusing with version names, so to make it easier we call each build a different name that actually appears under the app icon on iPad.
That name is different from the name I registered the app with.
So let's say:
name under the app icon on iPad: SampleA
inneractive appID: CompanyName_Sample_iPad

could that be the issue?
does inneractive look for the name Sample somewhere and finds SampleA instead and therefore does not deliver the ads?
Should I be defining the app name somewhere in the build settings?
Or always call it Sample when building?

thanks. Luciane

Viewing options

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