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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
Scientific
Posts: 90
Registered: ‎06-04-2010
My Carrier: verizon
Accepted Solution

Displaying Ads

Hello I have just downloaded the Ad SDK from blackberry. Followed all the rules to get the .jar files to my project and also loaded the .cod file to my simulator.

I provided this code in the constructor which I wanted my ad to display and everytime I try and open the app. I wont open. Says its an uncaught error.  I also put a try, catch statement around this piece of code.

Here is the code:

import net.rim.blackberry.api.advertising.app******.Banner;


Banner bannerAd = new Banner(******, null);
bannerAd.setMMASize(Banner.MMA_SIZE_EXTRA_LARGE);
add(bannerAd);

What am I doing wrong?

Please Help

Thanks

Scientific

Please use plain text.
Developer
YamilBracho
Posts: 516
Registered: ‎05-31-2010
My Carrier: Movistar

Re: Displaying Ads

I just learned that BAS does not work in the simluator. However it works with the device...

Please use plain text.
Developer
Scientific
Posts: 90
Registered: ‎06-04-2010
My Carrier: verizon

Re: Displaying Ads

So I would need to run this on a device?  That pretty poor that BlackBerry has a whole tutorial set up for how to run it on a simulator.

 

Thanks

 

Scientific

Please use plain text.
Developer
YamilBracho
Posts: 516
Registered: ‎05-31-2010
My Carrier: Movistar

Re: Displaying Ads

I have this code (It's the same as BAS docs)

 

private static final int PLACEMENT_ID = XXXXXX;	
	
public AdDemoScreen() {
   Banner bannerAd = new Banner(PLACEMENT_ID, null);
   bannerAd.setMMASize(Banner.MMA_SIZE_EXTRA_LARGE);
		
   add(new LabelField("Up the banner"));
   add(new SeparatorField());
   add(bannerAd);
   add(new SeparatorField());
   add(new LabelField("Down the banner"));
}

 

And in the simulator does not show any add. I ask technical support and learned that BAS does not work with simulator (simulator cannot show Live Campaigns.) You have to ask for switching to test mode.

 

Please use plain text.
Developer
QuiteSimple
Posts: 1,328
Registered: ‎11-06-2009
My Carrier: WiFi

Re: Displaying Ads

You can check this forum, it is all about BBAS

 

http://supportforums.blackberry.com/t5/BlackBerry-Advertising-Service/bd-p/ads_serv



"When you become a level 3 developer, you learn to communicate over the ether. I'm told that level 5 developers are ascend into a higher level of existence beyond the physical realm." gord888 @ crackberry
Please use plain text.
Developer
Scientific
Posts: 90
Registered: ‎06-04-2010
My Carrier: verizon

Re: Displaying Ads

Ok thank you very much.

 

Any ideas why my app keeps throwing an error everytime I try to open it?

It sounds like you guys can get your app open but theres just no ads.

 

Thank you very very much for this help.

 

Scientific

Please use plain text.
Developer
abhi007tyagi
Posts: 215
Registered: ‎09-29-2010
My Carrier: Airtel

Re: Displaying Ads

@Scientific

 

were you able to run the demo on simulator or on device?

I am also seeing noclassdef error when I launch my app

 

Thanks

Abhinav

Blackberry Z10-Limited Edition
Blackberry Playbook (won in free playbook offer)
My Apps : pAinT, HealthMeter, Shoot
Please use plain text.