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
Trusted Contributor
sergiosandoval
Posts: 132
Registered: ‎02-17-2012
My Device: Bold 9900
My Carrier: AT&T

BB10 BBM Integration

Im looking to make my BB10 app intergrate with BBM and I just want to know what it is I need to just make the user to  change their BBM status to " Im using so and so" when they run the app.

 

Thank you in advance.

Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 619
Registered: ‎10-01-2009
My Device: Z10
My Carrier: Bell

Re: BB10 BBM Integration

Hello,

 

I'd start by checking out our documentation here, https://developer.blackberry.com/html5/apis/blackberry.bbm.platform.html

 

More specifically you'll be looking at using setPersonalMessage which is shown here - https://developer.blackberry.com/html5/apis/blackberry.bbm.platform.self.html#.setPersonalMessage

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.
Trusted Contributor
sergiosandoval
Posts: 132
Registered: ‎02-17-2012
My Device: Bold 9900
My Carrier: AT&T

Re: BB10 BBM Integration

If I use the "setPersonalMessage" update do I need the platform stuff too?

Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 619
Registered: ‎10-01-2009
My Device: Z10
My Carrier: Bell

Re: BB10 BBM Integration

Yes, you'll need the whole thing.  The user must register with the BBM platform first before you can proceed with any BBM specific calls.

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.
Trusted Contributor
sergiosandoval
Posts: 132
Registered: ‎02-17-2012
My Device: Bold 9900
My Carrier: AT&T

Re: BB10 BBM Integration

I see, thank you!

 

 

Please use plain text.
Developer
ignites
Posts: 466
Registered: ‎04-11-2012
My Device: Bold 9900
My Carrier: Rogers

Re: BB10 BBM Integration

[ Edited ]

I want to do the same thing within BB OS 7 I tried using the documentation but was not successful

 

this is basically what i did

 

in config.xml i put in the line 

 

<feature id="blackberry.bbm.platform" />

 

within the app I put in a function called justAtest which I know works because it runs other features which work

 

 

function justAtest(){

//some codes that work

// Set the user's status and status message blackberry.bbm.platform.self.setStatus("busy", "Playing Tic-Tac-Toe!", function (accepted) { if(accepted) { // User allowed the change } else { // User denied the change } });

//some other code to confirm no crash/funciton is done

}

However the BBM status is not updated on my device am I missing something else as well? I did not get a prompt asking for BBM permissions, however, I thought the featureid line already enough to request permissions.

 

Thanks!


Developer for easyDial for BlackBerry Bold & inLink for BlackBerry PlayBook
Find me online via twitter, or on the techfruits.com webpage. Please hit the like button below if what I said helped!
Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 619
Registered: ‎10-01-2009
My Device: Z10
My Carrier: Bell

Re: BB10 BBM Integration

You still need to register with the service before you do anything relating to BBM like so..

 

// Create callback invoked when access changes
blackberry.bbm.platform.onaccesschanged = function(accessible, status) {
    if (status == "allowed") {
        // Access allowed
    } else if (status == "user") {
        // Access blocked by user
    } else if (status == "rim") {
        // Access blocked by RIM
    }
    // Listen for other status...
};

// Register with the platform
blackberry.bbm.platform.register({
    uuid: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" // Randomly generated UUID
});

 

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.
Developer
ignites
Posts: 466
Registered: ‎04-11-2012
My Device: Bold 9900
My Carrier: Rogers

Re: BB10 BBM Integration

Thanks Chad, I did that now in my onload function, however,  that function copy and pasted from the webworks Site above in my original post does not work. I do, however get the BBM app permission connectivity prompts. 


Developer for easyDial for BlackBerry Bold & inLink for BlackBerry PlayBook
Find me online via twitter, or on the techfruits.com webpage. Please hit the like button below if what I said helped!
Please use plain text.
Trusted Contributor
sergiosandoval
Posts: 132
Registered: ‎02-17-2012
My Device: Bold 9900
My Carrier: AT&T

Re: BB10 BBM Integration

Do i add this in my index file? Or my main html file?

Please use plain text.
BlackBerry Development Advisor
chadtatro
Posts: 619
Registered: ‎10-01-2009
My Device: Z10
My Carrier: Bell

Re: BB10 BBM Integration

Usually it goes in any JavaScript file your index.html includes, but could go into index.html.  I recommend reading the documentation first.

 

https://developer.blackberry.com/html5/apis/blackberry.bbm.platform.html

Chad Tetreault | App Development Consultant | BlackBerry Developer Relations | developer.blackberry.com | @chadtatro
Please use plain text.