Another attempt to get in-app ad working. alpha code - needs real device testing

Previous topic - Next topic

dreamerman

I know it's Friday night, but the sooner the better.
One form of making $$ from games is in-app advertising, but so far we had no luck with it. Although there were attempts to make iads working on ios, but from what I see, now it does not work. That's why it's time to move on.
When it goes to writing custom ad network client there are several fundamental problems:
1. gif loading - this format is used for animated banners by some ad networks..
Now, thanks to the gif loader (available here), we can use this format so the problem disappeared.
2. user-agent string - such as in a default browser on the phone .. now we have to manually type it into code, and as you know, it will not be 100% correct with what is shown by browser.
3. uuid / imei - I do not know how it currently looks like - whether the uuid collecting applications are rejected? because, some networks require to pass encoded (eg md5) uuid or MAC address - which you can not currently retrieve in GLBasic.

After recently viewing different source codes  (eg 'ad mediator' for corona sdk) I stated that if they can use in-app advertising, we also should do it! ;] I have rewritten my old unfinished custom parser for one of ad networks, improved many things and now alpha code is ready to testing. Unfortunately I do not have any other device than my pc  so I ask you to help with testing.

Currently there are parsers for 3 ad networks: InnerActive, InMobi and madvertise - on the pc when setting test APP_ID for them, all these networks response with test banners showing that implementation is correct. Another ad networks can be easily added - it would be good if such network would have a Client API - not only sdk.

A lot of talk but how to test it?
We need real device testing, on some ready games/apps - check if ad providers response with real ads, does parsers work properly on them, and most important, does clicks are counted.

Example use of code - to see test banners:
Code (glbasic) Select
//remember to include gif loading routines
SETCURRENTDIR("Media")
LOCAL t1%, t2%, t3%, gif_cframe%, gif_frames%, ad_loaded%, ad_frame%
Init_Gif_loader()
SOCK_INIT()

Init_basad_ads(100, 1, 480, 800, "games", 20, "m", "http://www.dreamerman.netserwer.pl/script/check_it.php")
basad_enableInnAct("", 0)
basad_enableInMobi("", 0)
basad_enablemadvertise("")
basad_setnetorder("innact") //change to inmobi/madv, or combination "innact,inmobi,madv" - uncomment debug cmd in basad to see how networks response
basad_GetNewAd()
while (basad_sock%<>-1)
basad_recvloop()
SLEEP 100
WEND
SOCK_SHUTDOWN
DEBUG "error: " + basad_errcode% + " -> " + basad_errstr$ + "\n" //if all ok should return err=0

LOCAL done% = 1
CLEARSCREEN RGB(100, 50, 50)
WHILE done%
IF KEY(01); done% = 0; ENDIF

INC ad_frame%
IF (ad_frame% >= basad_banner_frames%); ad_frame% = 0; ENDIF

SLEEP 50
IF (basad_banner_frames% <> -1); DRAWANIM basad_spriteid%, ad_frame%, 10, 300; ENDIF //draw fancy ad banner
SHOWSCREEN
WEND
END


NOTE: 'madvertise' ad network need our IP address as parameter in POST body, so additional script is required to retrieve our ip, example code included in source.
Also this provider doesn't like some 'user-agents'  for example TouchPad isn't recognized = even test ads aren't served.

[attachment deleted by admin]
Check my source code editor for GLBasic - link Update: 20.04.2020

mentalthink

HI I test in PC windows and Palm Pre, and runs... I always have the same banner, a USA city... but seems works!!!

I only advice whit 1 error, when I say to compile to Palm Pre, I have whit a preprocessor directive 1 error.

I think this project it´s very interesting... a good point for the sales and downloads of an application it´s the advertising, in fact in the future (this it´s says a Spaninsh Publisher), the game will be free, because whit advertaising you win money always, only open your App.

PS: If anyone wnat listen the Youtube videos tell me, but it´s in Spaninsh completly


[attachment deleted by admin]

matchy

Quote from: dreamerman on 2012-Aug-24
Although there were attempts to make iads working on ios, but from what I see, now it does not work. That's why it's time to move on.

So you are attempting to update for iOS yourself?

spacefractal

This is a awesome.

The uuid issue should been resovled in the upcoming v11, which its should use OpenUdid on iOS.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

dreamerman

@mentalthink: thanks, 'bug' fixed..

@matchy: I think that we should try to use such custom ad clients as this, and t least check does it work properly.

Little update. I have added 'madvertise' network with html & xml parsers, it's working properly, on pc test banner is shown.
That provider requires our IP as parameter in body of POST request so additional php script is needed, example in source, link to temporary script on my server is in first post.

True test would be if someone will register his game on one of these networks (it does not oblige to anything), and test 'basad' with real app_id/keys and on real device.
Check my source code editor for GLBasic - link Update: 20.04.2020

matchy

Quote from: dreamerman on 2012-Aug-25
@matchy: I think that we should try to use such custom ad clients as this, and t least check does it work properly.

Who is "we" and why do you think want to invest time in adverts when it's not really worth it?