net.rim.blackberry.api.bbm.platform.service
Class UIService

java.lang.Object
  |
  +--net.rim.blackberry.api.bbm.platform.Plugin
        |
        +--net.rim.blackberry.api.bbm.platform.service.Service
              |
              +--net.rim.blackberry.api.bbm.platform.service.UIService

public abstract class UIService
extends Service

This class provides access to the BBM UI, allowing you to add menu items, start a BBM chat, send a file to BBM, and other functionality


 
Method Summary
abstract  MenuItemManager getMenuItemManager()
          Returns an instance of the MenuItemManager.
abstract  void inviteToBBM()
          Displays contact picker with all contacts who are not in user's BBM Contact List but in the application's session/channel.
abstract  void inviteToBBM(BBMInvitationRequest[] requests)
          The application can use this method to send a BBM invitation to contacts whose information is provided by BBMInvitationRequest.
abstract  void inviteToBBM(BBMPlatformConnection connection)
          Displays the contact picker with contacts in the session/channel.
abstract  BBMPlatformContactList showContactPicker(String title, ContactListProvider clProvider, boolean isMultiSelectSupported, boolean showSelectAll)
          Displays Contact Picker with contacts provided by ContactListProvider
abstract  BBMPlatformContactList showContactPicker(String title, ContactListProvider clProvider, int groupType, boolean isMultiSelectSupported, boolean showSelectAll)
          displays Contact Picker with provided groupType contacts displays Contact Picker with contacts provided by ContactListProvider
abstract  BBMPlatformContactList showContactPicker(String title, int groupType, boolean isMultiSelectSupported, boolean showSelectAll)
          Displays Contact Picker with provided groupType contacts
abstract  void startBBMChat(BBMPlatformContactList contactList, String message)
          Opens a BBM conversation window with the provided contact and a specified message in the ReplyField
abstract  void startBBMChat(String message)
          Opens a BBM conversation window with a specified message in the ReplyField and opens a contact picker containing all the BBM contacts
 
Methods inherited from class net.rim.blackberry.api.bbm.platform.Plugin
getName
 

Method Detail

getMenuItemManager

public abstract MenuItemManager getMenuItemManager()
Returns an instance of the MenuItemManager.
Since:
BBM SDK 1.0

inviteToBBM

public abstract void inviteToBBM()
Displays contact picker with all contacts who are not in user's BBM Contact List but in the application's session/channel. It allows the user to invite selected contacts to BBM.

This method will block as the user selects contacts to invite.

Since:
BBM SDK 1.0

inviteToBBM

public abstract void inviteToBBM(BBMInvitationRequest[] requests)
The application can use this method to send a BBM invitation to contacts whose information is provided by BBMInvitationRequest. A contact picker is displayed from which the user can select the contacts to be invited to BBM. Contacts that are already in the BBM contact list will not be available for selection.
Parameters:
requests - array of BBMInvitationRequest for contacts that the user can select to invite to BBM.

This method will block as the user selects contacts to invite.

If requests is null or of size 0 or contains contacts, this method will return without any action. The contact picker will show up containing the list of BBMInvitationRequest which return valid values for BBMInvitationRequest.getId() and BBMInvitationRequest.getName() If none of the BBMInvitationRequest in requests contains a valid value for BBMInvitationRequest.getId() or BBMInvitationRequest.getName() this method will return without any action.

Throws:
IllegalArgumentException - if requests size exceeds 24
Since:
BBM SDK 1.0

inviteToBBM

public abstract void inviteToBBM(BBMPlatformConnection connection)
Displays the contact picker with contacts in the session/channel. The user can select contacts to be invited to BBM. Contacts that are already in the BBM contact list will not be available for selection.
Parameters:
connection - The connection from which the TPA user wants to invite BBM contacts.

If connection is null or has no contacts this method will return without any action. If there is only 1 contact in the connection that is not on the user's BBM contact list, the contact picker screen will be skipped and the user will be taken to the BBM Invitation Screen.

This method will block as the user selects contacts to invite.

Since:
BBM SDK 1.0

showContactPicker

public abstract BBMPlatformContactList showContactPicker(String title,
                                                         ContactListProvider clProvider,
                                                         boolean isMultiSelectSupported,
                                                         boolean showSelectAll)
Displays Contact Picker with contacts provided by ContactListProvider
Parameters:
title - of contact picker UI
clProvider - ContactListProvider provides list of group names and contact list for each group
isMultiSelectSupported - adds checkboxes if its true
showSelectAll - adds SelectAll option on the top if true, will have not effect if isMultiSelectSupported is false
Returns:
user selected Contact list, returns empty list if user cancels
Since:
BBM SDK 1.0

showContactPicker

public abstract BBMPlatformContactList showContactPicker(String title,
                                                         ContactListProvider clProvider,
                                                         int groupType,
                                                         boolean isMultiSelectSupported,
                                                         boolean showSelectAll)
displays Contact Picker with provided groupType contacts displays Contact Picker with contacts provided by ContactListProvider
Parameters:
title - of contact picker UI
clProvider - ContactListProvider provides list of group names and contact list for each group
groupType - defined in ContactListProvider ContactListProvider
isMultiSelectSupported - adds checkboxes if its true
showSelectAll - adds SelectAll option on the top if true, will have not effect if isMultiSelectSupported is false
Returns:
user selected Contact list, returns empty list if user cancels
Since:
BBM SDK 1.0

showContactPicker

public abstract BBMPlatformContactList showContactPicker(String title,
                                                         int groupType,
                                                         boolean isMultiSelectSupported,
                                                         boolean showSelectAll)
Displays Contact Picker with provided groupType contacts
Parameters:
title - of contact picker UI
groupType - defined in ContactListProvider
isMultiSelectSupported - adds checkboxes if its true
showSelectAll - adds SelectAll option on the top if true, will have not effect if isMultiSelectSupported is false
Returns:
user selected Contact list, returns empty list if user cancels
Since:
BBM SDK 1.0

startBBMChat

public abstract void startBBMChat(BBMPlatformContactList contactList,
                                  String message)
Opens a BBM conversation window with the provided contact and a specified message in the ReplyField
Parameters:
contactList - list of contacts with whom to converse
message - to display in the ReplyField of the conversation window
Since:
BBM SDK 1.0

startBBMChat

public abstract void startBBMChat(String message)
Opens a BBM conversation window with a specified message in the ReplyField and opens a contact picker containing all the BBM contacts
Parameters:
message - to display in the ReplyField of the conversation window
Since:
BBM SDK 1.0



Copyright 1999- Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.