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



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


RADIO FREQUENCY SYSTEMS (CA-TC-26272-015) 15 METERS/49 FEET LONG (8-PIN) picture

RADIO FREQUENCY SYSTEMS (CA-TC-26272-015) 15 METERS/49 FEET LONG (8-PIN)

$150.00



Balluff BIS M-371-000-A01 Radio Frequency Identification System BIS00WM New picture

Balluff BIS M-371-000-A01 Radio Frequency Identification System BIS00WM New

$419.99



Parts Only - Amplifier, Radio Frequency AM - 6154 / GRT21 Rack Unit with Cover picture

Parts Only - Amplifier, Radio Frequency AM - 6154 / GRT21 Rack Unit with Cover

$79.95



TSG-17 Signal Generator 100kHz-150MHZ RF/AM Radio Frequency Signal Generator NEW picture

TSG-17 Signal Generator 100kHz-150MHZ RF/AM Radio Frequency Signal Generator NEW

$78.80



Vintage Clough Bengle Model CB1 Radio Frequency Meter For Parts picture

Vintage Clough Bengle Model CB1 Radio Frequency Meter For Parts

$299.99



Radio Frequency Hazard ANSI Danger Sign Metal Plastic Decal picture

Radio Frequency Hazard ANSI Danger Sign Metal Plastic Decal

$40.99







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