BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 01-27-2012, 07:12 PM   #1
bassplayerpatrick
New Member
 
Join Date: Jan 2012
Model: 8520
PIN: N/A
Carrier: vodafone
Posts: 2
Question how do i register my app with BBM?

Please Login to Remove!

Hi,

i'm playing around with the BB JDE 5.0.0 API and i'm trying to create an app that reacts when a BBM message is received.
I have looked at the example (TicTacToe) app which should explain this, but this app actually connects with another user first to initiate the interaction.
I just want to react on an incoming BBM message without knowing who sent it.
The API-docs do not make it very clear to me so i hope there's someone out here that can.
Here's a sample of my code which doesn't work:
Code:
// intentionally omitted imports to shorten post

public class BBMReact extends UiApplication
{
  public static void main(String[] args)
{
  // don't know if this is necessary, except when using a screen
  BBMReact bbmReact = new BBMReact();
  bbmReact.enterEventDispatcher();

  ApplicationDescriptor adBBMReact = ApplicationDescriptor.currentApplicationDescriptor();
  BlackBerryMessenger bbm = BlackBerryMessenger.getInstance();
  if (bbm != null)
  {
    bbm.addSessionRequestListener(new BBMReactRequestListener(), adBBMReact);
  }

  public BBMReact ()
  {
    // some constructor code (maybe a pushscreen or something)
  }
}

private class BBMReactRequestListener implements SessionRequestListener 
{
    
  public void sessionRequestAccepted( Session session ) 
  {
    session.addListener(new BBMReactSessionListener(), ApplicationDescriptor.currentApplicationDescriptor());
  }
}

private class BBMReactSessionListener implements SessionListener
{
  public BBMReactSessionListener()
  {
    // TODO Auto-generated constructor stub
  }

  public void messageDelivered(Session session, Message message)
  {
    // TODO Auto-generated method stub
  }

  public void messageQueuedForSend(Session session, Message message)
  {
    // TODO Auto-generated method stub
  }

  public void messageReceived(Session session, Message message)
  {
    // This is where the reaction should take place
    Dialog.alert("You've got a BBM message!");
  }

  public void messageSent(Session session, Message message)
  {
    // TODO Auto-generated method stub
  }

  public void sessionClosed(Session session)
  {
    // TODO Auto-generated method stub
  }
}
Where or what am i doing wrong? Plz, help me understand the BBM API
Offline  
Old 01-27-2012, 10:48 PM   #2
hrbuckley
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Default Re: how do i register my app with BBM?

Just off hand I would expect that what you are trying to do is not supported by the API. If it is, it would allow any BBM connected application to spy on other application traffic. Not normally the way RIM does things.
__________________
My other Blackberry is a PlayBook.
Offline  
Old 01-30-2012, 04:59 AM   #3
bassplayerpatrick
New Member
 
Join Date: Jan 2012
Model: 8520
PIN: N/A
Carrier: vodafone
Posts: 2
Question Re: how do i register my app with BBM?

Quote:
Originally Posted by hrbuckley View Post
Just off hand I would expect that what you are trying to do is not supported by the API. If it is, it would allow any BBM connected application to spy on other application traffic. Not normally the way RIM does things.
Then how can one make an app that changes the LED color for different types of incoming messages like, for instance, Ponas LED (there are more).

I think the only way to establish such is when you register with the messaging apps (services) to "catch" an incoming message.

I want to learn how to do exactly that.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads for: how do i register my app with BBM?
Thread Thread Starter Forum Replies Last Post
Recurring App World Problem Satchurator BlackBerry Help 3 12-24-2011 06:48 AM
App 'Reinstall' only option & BBM Help Prox BlackBerry Help 1 10-14-2011 09:53 AM
App World - BB Podcast Issue jimfraser BlackBerry Help 0 10-04-2011 05:18 PM
BlackBerry App World 2.0 Unveiled; Includes Carrier Billing, BBID, and More Superh3ro General BlackBerry Discussion 0 06-17-2010 09:16 PM
I need help please -bbm IGEMZ General BlackBerry Discussion 6 12-19-2009 08:44 AM


55 LB Electric Lift Magnet Electromagnet Solenoid Holding 57mm Robotics 12v 24v picture

55 LB Electric Lift Magnet Electromagnet Solenoid Holding 57mm Robotics 12v 24v

$17.50



Electromagnet 11 LB DC 12V Holding Electromagnet Lift Magnet Electric Motor picture

Electromagnet 11 LB DC 12V Holding Electromagnet Lift Magnet Electric Motor

$9.87



55 LB Electric Lift Magnet Electromagnet Solenoid Holding 40mm picture

55 LB Electric Lift Magnet Electromagnet Solenoid Holding 40mm

$13.99



DC 3V 5V 9V 12V 24V Linear Suction Tubular Actuator Mini Solenoid Electromagnet picture

DC 3V 5V 9V 12V 24V Linear Suction Tubular Actuator Mini Solenoid Electromagnet

$2.99



12V DC 800N Electric Lifting Magnet Electromagnet Solenoid Lift Holding picture

12V DC 800N Electric Lifting Magnet Electromagnet Solenoid Lift Holding

$31.62



12V DC Electric Lifting Magnet Electromagnet Solenoid Lift Holding 200kg/2000N  picture

12V DC Electric Lifting Magnet Electromagnet Solenoid Lift Holding 200kg/2000N

$69.00







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.