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

Web and WebWorks Development

Reply
Developer
wantoun
Posts: 165
Registered: ‎10-04-2010
My Carrier: alfa Lebanon
Accepted Solution

BBM Integration

Hello,

 

So I'm using some of the code from the sample app that is available from RIM (BBMWebWorksDemo).

My app requests to be connected to BBM, but then it gets stuck on Step2 and says that the server is unreachable.

 

It even does this with the demo app itself (BBMWebWorksDemo). I am testing it on a real device, my Bold 9900.

Does it have to do with the UUID? I'm using an online generator to get it, should I register this UUID with RIM somehow?

 

Any help is really appreciated.

Wadi
Please use plain text.
Administrator
astanley
Posts: 1,359
Registered: ‎07-02-2009
My Carrier: Bell

Re: BBM Integration

Hi Wadi,

 

Have you authenticated with BBID on that device?  Has anything happened recently with that BBID account (password reset / locked out / etc).

 

The UUID is only necessary when testing on a simulator - in a live production environment, it actually retrieves a UUID for your BBID.  So no you don't need to register the UUID with RIM before using it in a BBM-connected app.

 

 

Where are you located? I wonder if there is a connectivity problem.

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
Developer
wantoun
Posts: 165
Registered: ‎10-04-2010
My Carrier: alfa Lebanon

Re: BBM Integration

Hi Adam,

Thanks for your reply. I'm in Beirut, Lebanon.
I don't think my BBID is the problem. I had used it the same day to connect Viber to BBM. I only get the problem that it won't connect to the server with my app, and the demo app. So I figured it must be something with my code or UUID.
Wadi
Please use plain text.
Administrator
astanley
Posts: 1,359
Registered: ‎07-02-2009
My Carrier: Bell

Re: BBM Integration

Have you tried running your code from the simulator?  Do you get the same behavior or is it able to connect as expected?

 

Would you mind sharing the snippet of code that shows how you are setting the onAccessChanged callback, and when the call to registrer() happens?

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
Developer
wantoun
Posts: 165
Registered: ‎10-04-2010
My Carrier: alfa Lebanon

Re: BBM Integration

This is the code I'm using:

bbmUtil.init = function () {
    // This is called when:
	// - Properties on the current user or other users' profile changes.
	// - Other users install/uninstall this application.
	// - The current user receives an invitation in BBM.
    blackberry.bbm.platform.users.onupdate = function (user, event) {
        if (event === "invited") {
            alert("You were invited to a chat. Go to BBM to accept it.");
        } else if (user.handle === blackberry.bbm.platform.self.handle) {
            userProfile.populate();
        }
    };
    // This is called in certain cases when the application is invoked from within BBM.
    // You can optionally handle these invocations to provide better integration, and interesting use cases.
    blackberry.bbm.platform.onappinvoked = function (reason, param, user) {
        var displayName, message;
        // Get display name
        if (user === blackberry.bbm.platform.self) {
            displayName = "your";
        } else {
            displayName = user.displayName + "'s";
        }

        // Create message for dialog based on reason
        message = "App invoked by " + displayName + " "; 
        if (reason === "profilebox") {
            var profileBoxItem = param;
            message += " profile box item:\n" + profileBoxItem.text;
            content.showProfileBox();
        } else if (reason === "profileboxtitle") {
            message += " profile box title";
            content.showProfileBox();
        } else if (reason === "personalmessage") {
            var personalMsg = param;
            message += "personal message:\n" + personalMsg;
        } else if (reason === "chatmessage") {
            message += "chat message";
        } else {
            // If unknown reason, do nothing
            return;
        }

        alert(message);
    };
    sharecontent.init(); // Set callbacks for share content
    connections.init();  // Set callbacks for connections

    /*
     * Finally the application should register with the platform.
     */
    bbmUtil.register();
};

 I didn't try it on a simulator, I'm on Mac! (didn't wanna go through the trouble of going into a Virtual Machine and reconfiguring a simulator) I just test apps on my device.

 

I attached an image of the error I keep getting!

 

Wadi
Please use plain text.
Developer
wantoun
Posts: 165
Registered: ‎10-04-2010
My Carrier: alfa Lebanon

Re: BBM Integration

I updated the FB app yesterday and noticed that I am getting the same error with the BBM connect.

I then tried: Viber, and Nobex radio... also the same problem.

 

So now I'm thinking it's not my code. Could it be my connection somehow? what can I do to better investigate the source of the error?

Wadi
Please use plain text.
Administrator
astanley
Posts: 1,359
Registered: ‎07-02-2009
My Carrier: Bell

Re: BBM Integration

Yeah I didn't think your code had any problems with it.

 

 

Connection issue maybe?  How are you connected to the Internet - do you know if it is through the BES, BIS or WiFi only transport?

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
Developer
wantoun
Posts: 165
Registered: ‎10-04-2010
My Carrier: alfa Lebanon

Re: BBM Integration

BIS
I even tried it on Wifi but got stuck at step 2 all the same!
I can browse, and all apps work fine: so I am connected to the internet.
Wadi
Please use plain text.
Developer
wantoun
Posts: 165
Registered: ‎10-04-2010
My Carrier: alfa Lebanon

Re: BBM Integration

I just updated my OS, and now it works fine.

I don't know what the exact problem was, but this seemed to fix it.

 

Thanks so much for your help Adam. Appreciate it :smileyhappy:

Wadi
Please use plain text.