Adjusting Ad Display Size

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dcpbarrington
Posts: 87
Joined: Tue Nov 13, 2007 6:40 pm

Adjusting Ad Display Size

Post by dcpbarrington » Sat Nov 23, 2013 2:07 am

LiveCode Community.

I'm using LiveCode Version 6.1.3 on Android Version 4.1.2 and have been able to get Inneractive Ads to be displayed on a card based on the following code.

Code: Select all

function initializeAd
   local tDetails
   if environment() is not "mobile" then exit initializeAd
   
   -- Initialize the Ad Details
   put "60" into tDetails["refresh"] // The advert refresh interval in seconds
   put 52 into tDetails["age"] // The age of the target audience
   put "male" into tDetails["gender"] // The expected gender of the target audience 
   put "599" into tDetails["distribution id"]
   
   mobileAdCreate "SHNAd1", "banner", (0,200), tDetails
   if the result is not Empty then
      answer error "Ad Create Error: " & the result
   end if   
   mobileAdSetTopVisible ("SHNAd1", true)
   
end initializeAd
The Banner Ad is displayed on the device, HOWEVER it is the size of a small icon and is completely unusable.
It does the same thing if you set the ad to "Text" format. Only "Full Screen" does just that with an icon to close the ad.

I've gone through the forum, the livecode lesson. http://lessons.runrev.com/s/lessons/m/4 ... n-livecode
as well as the dictionary and there is no information on how you can adjust the ad dimensions.

I found one post that use the ad type to adjust the size, but that doesn't do anything as it is not the name of an object on the card

Code: Select all

   set the height of "Banner" to 400
   set the width of "Banner" to width of this card
Any help would be appreciated. Is there a way to place the ad into a object and then adjust the object size?
Thanks in advance for the help.

dcpbarrington
Posts: 87
Joined: Tue Nov 13, 2007 6:40 pm

Re: Adjusting Ad Display Size

Post by dcpbarrington » Tue Nov 26, 2013 6:07 pm

Submitted this issue to LiveCode Support and they verified that this is a BUG in LiveCode 6.1,3 and 6.5.0 RC7

The functionality works properly in iOS, but not in Android.

http://quality.runrev.com/show_bug.cgi?id=11510

Hope this helps the forum.

Post Reply