10-09-2012 01:43 AM
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.
10-09-2012 08:53 AM
Hello,
I'd start by checking out our documentation here, https://developer.blackberry.com/html5/apis/blackb
More specifically you'll be looking at using setPersonalMessage which is shown here - https://developer.blackberry.com/html5/apis/blackb
10-09-2012 11:21 AM
If I use the "setPersonalMessage" update do I need the platform stuff too?
10-09-2012 11:41 AM
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.
10-09-2012 11:45 AM
I see, thank you!
10-09-2012 03:46 PM - edited 10-09-2012 03:47 PM
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!
10-09-2012 05:08 PM
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
});
10-09-2012 07:21 PM
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.
10-09-2012 07:35 PM
Do i add this in my index file? Or my main html file?
10-09-2012 07:49 PM
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/blackb