Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Member
Posts: 2
Registered: ‎11-01-2012
My Device: bold 9000
My Carrier: airtel

Error in adding ads - display only test ads.

Hi , i am trying to put ads in blackberry app using this code below. but unfortunately it display only test ads .

 

// bannerAd.setTestModeFlag(true);

 

whereas when i put ads using zone id. it displays a blank space. please help.....!!

 

code : - 

 

 

Banner bannerAd = new Banner(146016, null);

 

bannerAd.setMMASize(Banner.MMA_SIZE_EXTRA_LARGE);

 

// bannerAd.setTestModeFlag(true);

 

bannerAd.setBorderColor(Color.RED);

 

bannerAd.setBannerTransitionColor(Color.RED);

 

VerticalFieldManager vfm = new VerticalFieldManager (VerticalFieldManager.NO_VERTICAL_SCROLL |

 

VerticalFieldManager.NO_VERTICAL_SCROLLBAR | VerticalFieldManager.USE_ALL_WIDTH);

 

HorizontalFieldManager hfm = new HorizontalFieldManager (HorizontalFieldManager.FIELD_HCENTER | HorizontalFieldManager.FIELD_VCENTER);

 

hfm.add(bannerAd);

 

vfm.add(hfm);

 

add(vfm);