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

BlackBerry Advertising Service

Reply
New Contributor
Cstewierun
Posts: 4
Registered: ‎06-28-2011
My Carrier: Sprint

Help with BBAS conflicting screens

 

Developing an application for blackberry 

 

Using Eclipse Environment 

 

Dropped in the BBAS SDK and when we run the application on the blackberry torch emulator the app stops working and it becomes a white screen and only shows the ads. 

 

When I take out the SDK out the constructor the application works fine.

 

Having issues with this problem for some time and decided to turn toward the forums.

 

I suspect it has something to with the vertical field manager. However im not sure of the problem

 

If anyone else has experienced this problem, or if you know of the solution the help would be greatly appreciated, 

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

Re: Help with BBAS conflicting screens

Can you post piece of code, i.e. how do you implement the banner?


"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.
New Contributor
Cstewierun
Posts: 4
Registered: ‎06-28-2011
My Carrier: Sprint

Re: Help with BBAS conflicting screens

[ Edited ]

Sure Here it is, 

 

Class defination


import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.container.MainScreen;
public class Adservice extends UiApplication
{
//static int APID = 0;
 
public static void main(String[] args)
{
Adservice theApp = new Adservice();
theApp.enterEventDispatcher();
}
public Adservice()
{
pushScreen(new AdserviceScreen()); 
}
}
class AdserviceScreen extends MainScreen{
public AdserviceScreen() 
{
}
    
Implimentation
 
Banner bannerAd = new Banner(placementId, null);
    bannerAd.setMMASize(Banner.MMA_SIZE_AUTO);
    add(bannerAd);
Please use plain text.
Developer
QuiteSimple
Posts: 1,327
Registered: ‎11-06-2009
My Carrier: WiFi

Re: Help with BBAS conflicting screens

Nothing wrong so far, how do you add other fields? You've mentioned something about VerticalFieldManager?


"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.
New Contributor
Cstewierun
Posts: 4
Registered: ‎06-28-2011
My Carrier: Sprint

Re: Help with BBAS conflicting screens

At first we suspected the VerticalFieldManager was somehow causing the issue but after searching the forums it seems that issue actually lies somewhere with rim. The code is sound, once i remove the ad service code the application runs fine on the simulator. Once i comment it back in the I get the white sceern once again. Any solutions??

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

Re: Help with BBAS conflicting screens

I'd guess that is more your implementation than RIM's fault :smileyhappy: As I suggested before - post more of your code to show how do you add fields after the banner

Btw are you using the proper library? (there different libraries for different OS versions)


"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.
New Contributor
Cstewierun
Posts: 4
Registered: ‎06-28-2011
My Carrier: Sprint

Re: Help with BBAS conflicting screens

      public Screen1() {

      super(VerticalFieldManager.NO_VERTICAL_SCROLL);

    //Set Title   

  setTitle("Ultimate Drinking App"); 

              //Adservice     

Banner bannerAd = new Banner(41141 , null);

      bannerAd.setMMASize(Banner.MMA_SIZE_AUTO);

      add(bannerAd);

           //Set Background Color

    _manager = (VerticalFieldManager)getMainManager();

    Background bg = BackgroundFactory.createSolidBackground(0x184b97);

    _manager.setBackground(bg);


    //Set Background image

    _manager_logo = new

    VerticalFieldManager(VerticalFieldManager.USE_ALL_WIDTH |

    VerticalFieldManager.USE_ALL_HEIGHT | VerticalFieldManager.NO_VERTICAL_SCROLL | VerticalFieldManager.FIELD_HCENTER){

    //Override the paint method to draw the background image.

    public void paint(Graphics graphics)

   {

   //Draw the background image and then call super.paint

   //to paint the rest of the screen.

   graphics.drawBitmap(0, 0, 326, 413, logoBitmap, 0, 0);

   super.paint(graphics);

   }

        };

 

I looked into the libaray situtation to no avail even after i did make some corrections i received the same issue

Please use plain text.