|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.blackberry.api.bbm.platform.ui.MenuItemManager
Allows a plugin to add and remove menu items in the BlackBerry Messenger application.
Menu items will only be shown while a contact is highlighted and the contact has the same application.
Invoking a particular menu item will result in an invitation being sent to the contact.
The receiver of the invitation will get a notification through
BBMPlatformConnectionListener.contactsJoined(BBMPlatformConnection, BBMPlatformContactList, String, int),
where the cookie will be a String equal to menuItemId.
Your application can take appropriate action once this notification is received.
If the device is restarted, the menu items will be re-added automatically.
UIService.getMenuItemManager()| Method Summary | ||
abstract void |
addChannelInvitationMenuItem(int menuItemId,
String invitationMessage,
String label,
int order)
Adds a menu item to the BlackBerry Messenger's contact list screen. |
|
abstract boolean |
exists(int menuItemId)
Returns true if the calling application already added a menu item with the given id. |
|
static int |
getMaxLengthMenuItemLabel()
Returns the maximum value for the length of the menu item label. |
|
static int |
getMaxLengthMenuItemMessage()
Returns the maximum value for the length of the menu item invitation message. |
|
static int |
getMaxMenuItems()
Returns the maximum number of menu items allowed per application. |
|
abstract InvitationMenuItem |
getMenuItem(int menuItemId)
Returns a menu item for the calling application by the given id. |
|
abstract InvitationMenuItem[] |
getMenuItems()
Returns all menu items for the calling application. |
|
abstract void |
remove(int menuItemId)
Removes the menu item that belongs to the calling application with the provided id. |
|
abstract void |
removeAll()
Remove all menu items (if any) belonging to the calling application. |
|
| Method Detail |
public abstract void addChannelInvitationMenuItem(int menuItemId,
String invitationMessage,
String label,
int order)
menuItemId - menu id which should not change after the device resets; it will uniquely
identify the operation that is intended to be performed with this invitationinvitationMessage - message that will be displayed to the recipient, must be not null and
not longer than getMaxLengthMenuItemMessage()label - display name of the menu item, must not be null and not longer than getMaxLengthMenuItemLabel()order - display order of this menu item; lower order items will be displayed firstIllegalArgumentException - if invitation message is null or too longIllegalArgumentException - if label is null or too longIllegalArgumentException - if the application already has getMaxMenuItems() menu itemspublic abstract boolean exists(int menuItemId)
menuItemId - id of the menu item being checkedpublic static int getMaxLengthMenuItemLabel()
public static int getMaxLengthMenuItemMessage()
public static int getMaxMenuItems()
public abstract InvitationMenuItem getMenuItem(int menuItemId)
menuItemId - id of the menu itemnull if no menu item exists for menuItemId.public abstract InvitationMenuItem[] getMenuItems()
public abstract void remove(int menuItemId)
menuItemId - id that uniquely identifies the menu item in the calling applicationpublic abstract void removeAll()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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.