|
|||||||||
| 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.profile.UserProfileBox
A box for this application that appears in the current user's profile. Each box contains a list of items, each composed of text and an optional icon. There is a maximum of 3 items; as more are added, older items will be removed automatically.
This box can be viewed by the current user and their contacts, and is editable by the current user and the owning application (on this device). The current user can only remove items.
The user can control whether an application's profile box appears in his or her profile using the
BBM options for the application. Applications can modify the profile box whether or not the user
has enabled it. Applications can query this setting using SettingsManager.
registerIcon(int, EncodedImage). An application should register its entire set of
icons initially. This improves speed when the current user views this application in their
contacts' profiles. Since icons are registered to the filesystem this should be done on a
non-event thread.
The user can invoke an application through its profile box items in their profile or a
contact's profile. The application will be brought to the foreground and/or launched if not yet
running. The invoking profile box item can be obtained overriding BBMPlatformContextListener.appInvoked(int, Object)
with the reason code BBMPlatformContext.INVOKE_PROFILE_BOX_ITEM.
| Method Summary | ||
abstract UserProfileBoxItem |
addItem(int iconId,
String text)
Adds an item with icon and text. |
|
abstract UserProfileBoxItem |
addItem(int iconId,
String text,
String cookie)
Adds an item with icon, text, and a customizable parameter. |
|
abstract UserProfileBoxItem |
addItem(String text)
Adds an item with text. |
|
abstract EncodedImage |
getIcon(int iconId)
Gets a registered icon by its ID. |
|
abstract UserProfileBoxItem |
getItem(int itemId)
Returns an item by its ID. |
|
abstract int |
getItemCount()
Returns the number of items. |
|
abstract int[] |
getItemIds()
Returns the item IDs. |
|
abstract UserProfileBoxItem[] |
getItems()
Returns the items. |
|
abstract boolean |
isAccessible()
Returns whether the profile box is accessible and can be updated. |
|
abstract boolean |
isIconRegistered(int iconId)
Returns whether an icon is registered for an icon ID. |
|
abstract void |
registerIcon(int iconId,
EncodedImage icon)
Registers a static icon for use in profile box items. |
|
abstract void |
removeAllItems()
Removes all items. |
|
abstract UserProfileBoxItem |
removeItem(int itemId)
Removes an item by its ID. |
|
| Method Detail |
public abstract UserProfileBoxItem addItem(int iconId, String text) throws UserProfileBoxAccessException
iconId - The ID of a registered icon. -1 if there is no icon.text - The item text.IllegalArgumentException - if text.length() > 100 or text has more than 2 new line characters.UserProfileBoxAccessException - if the device is in mass storage mode.public abstract UserProfileBoxItem addItem(int iconId, String text, String cookie) throws UserProfileBoxAccessException
iconId - The ID of a registered icon. -1 if there is no icon.text - The item text.cookie - The customizable item parameter.IllegalArgumentException - if text.length() > 100 or text has more than 2 new line characters.IllegalArgumentException - if cookie.length() > 128.UserProfileBoxAccessException - if the device is in mass storage mode.public abstract UserProfileBoxItem addItem(String text) throws UserProfileBoxAccessException
text - The text for the item.IllegalArgumentException - if text.length() > 100 or text has more than 2 new line characters.UserProfileBoxAccessException - if the device is in mass storage mode.public abstract EncodedImage getIcon(int iconId) throws UserProfileBoxAccessException
iconId - The icon's ID.null if no icon is registered for iconId.UserProfileBoxAccessException - if the device is in mass storage mode.public abstract UserProfileBoxItem getItem(int itemId) throws UserProfileBoxAccessException
itemId - The item ID.null if there is no item for itemId.UserProfileBoxAccessException - if the device is in mass storage mode.
public abstract int getItemCount()
throws UserProfileBoxAccessException
UserProfileBoxAccessException - if the device is in mass storage mode.
public abstract int[] getItemIds()
throws UserProfileBoxAccessException
UserProfileBoxAccessException - if the device is in mass storage mode.public abstract UserProfileBoxItem[] getItems() throws UserProfileBoxAccessException
UserProfileBoxAccessException - if the device is in mass storage mode.public abstract boolean isAccessible()
true if the profile box is accessible; false otherwise.
public abstract boolean isIconRegistered(int iconId)
throws UserProfileBoxAccessException
iconId - The icon ID to check.true if an icon with ID iconId is registered; false otherwise.UserProfileBoxAccessException - if the device is in mass storage mode.
public abstract void registerIcon(int iconId,
EncodedImage icon)
throws UserProfileBoxAccessException
iconId - The icon ID. Must be >= 0.icon - The icon.IllegalArgumentException - if iconId < 0.UserProfileBoxAccessException - if the device is in mass storage mode.
public abstract void removeAllItems()
throws UserProfileBoxAccessException
UserProfileBoxAccessException - if the device is in mass storage mode.public abstract UserProfileBoxItem removeItem(int itemId) throws UserProfileBoxAccessException
itemId - The item ID.null if the item was not found.UserProfileBoxAccessException - if the device is in mass storage mode.
|
|||||||||
| 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.