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


Allen-Bradley 1747-M12/A SLC 500 Flash Memory Module New picture

Allen-Bradley 1747-M12/A SLC 500 Flash Memory Module New

$265.00



Allen Bradley 2711P-RR128 PanelView Plus 128MB RAM Memory Module Ser. A picture

Allen Bradley 2711P-RR128 PanelView Plus 128MB RAM Memory Module Ser. A

$159.99



Memory Stick RAM Shipping Box - 5 Trays fits 250 DDR5 DDR4 DDR3 DIMM Modules New picture

Memory Stick RAM Shipping Box - 5 Trays fits 250 DDR5 DDR4 DDR3 DIMM Modules New

$41.50



Memory Blister Pack Box for DDR DIMM Module Anti Static - Lot of 6 18 35 100 200 picture

Memory Blister Pack Box for DDR DIMM Module Anti Static - Lot of 6 18 35 100 200

$17.95



NEW Original Allen Bradley 2080-MEMBAK-RTC Memory Module With RTC Plug-In picture

NEW Original Allen Bradley 2080-MEMBAK-RTC Memory Module With RTC Plug-In

$288.89



Dental Endodontic Endo Memory Engine Rotary Root Canal NiTi File 25mm files 6PCS picture

Dental Endodontic Endo Memory Engine Rotary Root Canal NiTi File 25mm files 6PCS

$349.50







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