blackberrybb-messenger

BBM Connected App Not Connecting


I am trying to make a BBM Connected App, using the BBM 1.3 SDK. For some reason, the app doesn't work on the two devices I have (9900 and 9780 @ OS 7.0 with BBM 6.1), even though it should, at least in pre production. Below is my registration code:

    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);

This is the code from the docs online, so I don't know why it doesn't work. context.isAccessAllowed() returns false on both devices, with the Access Error Code 0 (APP_ENVIRONMENT_TEST).

Both Device's have a working BBM and WiFi connection.

Any idea what could be causing this?


Solution

  • ANSWER

    I've managed to solve the problem. The code I was using is from a BBM Hackathon, and for some reason, doesn't work. By using the base code given in the online documentation, the app works fine, provided that there is an active screen before the BBM registration is done.