Current User
Provides access to the current user's information.
Supported Platform(s)
- BlackBerry OS 5.0+ |
- BlackBerry 10 |
API | BB5.0 | BB6.0 | BB7.0 | PB1.0 | PB2.0 | BB10 | Ripple |
---|---|---|---|---|---|---|---|
blackberry.bbm.platform.self.getDisplayPicture | Y | ||||||
blackberry.bbm.platform.self.setDisplayPicture | Y | Y | Y | ||||
blackberry.bbm.platform.self.setDisplayPicture | Y | ||||||
setPersonalMessage | Y | ||||||
setPersonalMessage | Y | Y | Y | Y | |||
setStatus | Y | ||||||
setStatus | Y | Y | Y |
Configuration Document Settings
To use all of the API described for this object, you must ensure the following settings are in your configuration document: |
You must declare the feature element(s) below in your configuration document: |
Feature ID | BB5.0 | BB6.0 | BB7.0 | PB1.0 | PB2.0 | BB10 | Ripple |
---|---|---|---|---|---|---|---|
<feature id="blackberry.bbm.platform" /> | Y | Y | Y | Y |
Permission Elements (PlayBook and BlackBerry 10+) |
---|
You must declare the permission element(s) below in your configuration document: |
- <rim:permit>bbm_connect</rim:permit>
BBM APIs requre this permission to be set |
Functions
Properties
void | setPersonalMessage |
void | setPersonalMessage |
void | setStatus |
void | setStatus |
|
Functions
static
void
blackberry.bbm.platform.self.getDisplayPicture
(onComplete: function(image : String))
Gets the user's display picture.
Supported Platforms | |
---|---|
- BlackBerry 10 |
Parameters | |
---|---|
onComplete |
Invoked when the image has been retrieved.
image: contains a base64 string representation of the image |
Code Example:
|
static
void
blackberry.bbm.platform.self.setDisplayPicture
(displayPictureURI : String, onComplete: function(accepted : Boolean))
Sets the user's display picture from a URI. A dialog appears and allows the user to accept or cancel the change.
The URI must be fully qualified. Non-local URIs must be whitelisted in the application's configuration file. Examples:
- Locally from within the widget package (e.g. "local:///smiley.jpg")
- From the filesystem of a BB5.0+ device (e.g. "file:///SDCard/BlackBerry/pictures/smiley.jpg")
Supported Platforms | |
---|---|
- BlackBerry OS 5.0+ |
Parameters | |
---|---|
displayPictureURI | The fully qualified URI. |
onComplete |
Invoked when the user has dismissed the dialog.
accepted: true if the user accepted the change;
false otherwise.
|
Code Example:
|
static
void
blackberry.bbm.platform.self.setDisplayPicture
(displayPictureURI : String)
Sets the user's display picture from a URI. A dialog appears and allows the user to accept or cancel the change. Note that the display picture cannot exceed 32KB.
The URI must be fully qualified. Non-local URIs must be whitelisted in the application's configuration file. Examples:
- Locally from within the widget package (e.g. "local:///smiley.jpg")
- From the filesystem of a BB10 device (e.g. "/accounts/1000/shared/photos/smiley.jpg")
Supported Platforms | |
---|---|
- BlackBerry 10 |
Parameters | |
---|---|
displayPictureURI |
The fully qualified URI.
false otherwise.
|
Code Example:
|
Properties
static
void
setPersonalMessage
Sets the user's personal message. A dialog appears and allows the user to accept or cancel the change.
Supported Platforms | |
---|---|
- BlackBerry 10 |
Parameters | |
---|---|
personalMessage |
The personal message. The maximum length is 160 characters;
anything over will be truncated. If null is provided then the personal message
is cleared.
|
static
void
setPersonalMessage
Sets the user's personal message. A dialog appears and allows the user to accept or cancel the change.
Supported Platforms | |
---|---|
- BlackBerry OS 5.0+ | |
- BlackBerry 10 |
Parameters | |
---|---|
personalMessage |
The personal message. The maximum length is 160 characters;
anything over will be truncated. If null is provided then the personal message
is cleared.
|
onComplete |
Invoked if the user dismissed the dialog.
accepted: true if the user accepted the change;
false otherwise.
|
static
void
setStatus
Sets the user's status. A dialog appears and allows the user to accept or cancel the change.
Supported Platforms | |
---|---|
- BlackBerry 10 |
Parameters | |
---|---|
status |
The status: one of "available" or "busy" .
|
message | The optional status message. If not provided, the default message of either "Available" or "Busy" will be used. |
onComplete |
Invoked if the user dismissed the dialog.
accepted: true if the user accepted the change;
false otherwise.
|
static
void
setStatus
Sets the user's status. A dialog appears and allows the user to accept or cancel the change.
Supported Platforms | |
---|---|
- BlackBerry OS 5.0+ |
Parameters | |
---|---|
status |
The status: one of "available" or "busy" .
|
message | The optional status message. If not provided, the default message of either "Available" or "Busy" will be used. |
onComplete |
Invoked if the user dismissed the dialog.
accepted: true if the user accepted the change;
false otherwise.
|
Code Example:
|