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
greenback
Posts: 533
Registered: ‎10-17-2010
My Device: (BlackBerry Z10)-> Q10/Passport Dual Use

Updating BBM Profile Status in WebWorks BBOS 7 - Code?

Do any of you have the code for setting an icon and BBM profile status text in Webworks for BBOS?

 

:Batman:

BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10

Re: Updating BBM Profile Status in WebWorks BBOS 7 - Code?

Hi there, are these what you're looking for?

 

Display picture:

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

 

Status text:

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

 

I'm not sure exactly which icon you were referring to.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Trusted Contributor
sergiosandoval
Posts: 132
Registered: ‎02-17-2012
My Device: Bold 9900

Re: Updating BBM Profile Status in WebWorks BBOS 7 - Code?

 
<script type="text/javascript">
// 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
    }
});
</script>

Is this the only code I need to add to my .html file? To work with my BB10 app? Other than this line in the xml?

 

 

 

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

 

 

Thank you

BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10

Re: Updating BBM Profile Status in WebWorks BBOS 7 - Code?

Hi there,

 

Initially you'll need to ensure that you've actually registered with BBM on your application's launch. 

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

 

Beyond that, the code you noted should work as-is. Are you seeing issues?


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Trusted Contributor
sergiosandoval
Posts: 132
Registered: ‎02-17-2012
My Device: Bold 9900

Re: Updating BBM Profile Status in WebWorks BBOS 7 - Code?

No problems just researching. Before i mess up my app. 

 

Thank you. 

Trusted Contributor
sergiosandoval
Posts: 132
Registered: ‎02-17-2012
My Device: Bold 9900

Re: Updating BBM Profile Status in WebWorks BBOS 7 - Code?