I’ve been trying to use admediator with admob on kindle fire. I have a version of admediator from github from a couple of days ago.
In general, it works, and makes a small (320x50) ad taking up about half the width of the screen.
However, for some ads clicking just makes the ad disappear (as has been mentioned a few times in this thread.) I have not seen anyone mention the error message though.
I/Corona (15107): Lua Runtime Error: lua\_pcall failed with status: 2, error message is: bad argument #1 to 'gsub' (string expected, got nil)
Has anyone else seen this error message? Is there a fix?
UPDATE:
After looking into this a bit, the problem seems to be in admediator_admob.lua
Sometimes the format of the admob URL is:
gmsg://mobileads.google.com/open?a=browser&u=http%3A%2F%2Fhastrk1.com%2Fpub_c%3Fadgroup_id%3D5762%26ref_id%3Dad1&google.afma.Notify_dt=1340480361151
In admediator_admob.lua there is an piece of code that looks for the parameter “u”, which contains a url. It then requests this url.
local link = decodeUrlEncodedString(params.u)
network.request(link,"GET")
However, sometimes the format of the URL is:
gmsg://mobileads.google.com/touch?tx=156&ty=31&td=100&google.afma.Notify_dt=1340480243157
Here admediator_admob.lua cannot find parameter “u” and fails.
UPDATE2:
I think I found a solution here courtesy of @hoan:
http://developer.anscamobile.com/code/ad-mediator-corona?page=1#comment-109779
Also, if anyone knows pros and cons of having an ad only take up half the width of the screen, that would be useful to know. It just looks wrong. admediator has 320x50 hard-coded everywhere, so I haven’t tried to change the size.
[import]uid: 94304 topic_id: 21955 reply_id: 112896[/import]