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 Contributor
RaghavSood
Posts: 4
Registered: ‎05-23-2012
My Device: 9900

BBM Connected App Not Working as Expected

Hi all,

 

I'm developing a BBM Connected app (My first BlackBerry development experience, I come from an Android, Web and Desktop background).

 

I am trying ot test the app in the pre production environment, but for some reason, isAccessAllowed() returns false, with the AccessErrorCode 0 (APP_ENVIRONMENT_TEST). I am using the below code to register my app with BBM:

 

    try{

   Screen screen;

    BBMApp = new BBMPlatformApplication(Global.UUID);

   context = BBMPlatformManager.register(BBMApp);

   allowed = context.isAccessAllowed();

    listener = new BBMPlatformContextListener() {

 

public void accessChanged(boolean arg0, int arg1) {

   allowed = context.isAccessAllowed();

 

if(!allowed)

{

//Do nothing

}

else if(allowed)

{

 

}

}

};

   context.setListener(listener);

    screen = new MyScreen(context);

    // Push a screen onto the UI stack for rendering.

        pushScreen(screen);

 

   }

    catch(Exception e)

   {

    System.out.println(e.toString() + "asdf");

   e.printStackTrace();

    

   }    

 

However, isAccessAllowed() returns false. I've got a valid UUID etc. Testing is done on a Bold 9900 and Bold 9790, both with valid BBM connections.

 

Does anybody know what could be causing this?

 

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: BBM Connected App Not Working as Expected

Sorry this is being done off site and from memory, I don't have access to code or phone atm. 

 

First thing to check is to make sure you UUID is unique, but I'm sure you have done that.

 

Remember that the user has the control over whether your Application will connect to BBM or not.  It should actually display a screen to the user asking this and if the users says "don't connect" I think this is what you will get.  So when you register

  context = BBMPlatformManager.register(BBMApp);

you should see a popup.  Do you?

New Contributor
RaghavSood
Posts: 4
Registered: ‎05-23-2012
My Device: 9900

Re: BBM Connected App Not Working as Expected

Nope. I don't see any popup. There's no exception either. The app just pushes my screen and continues. None of the BBM related buttons work, but the other buttons like the one launching a file picker work fine.

 

Do you have any idea why said popup does not show up?

 

I tried with Wikitude on both phones, and a popup does show up to allow it to connect to BBM, so it isn't the phones.

 

Thanks