blackberry.bbm.platform.io.Channel
A connection to communicate with one or more peers, where the peers are not aware of each other. Each peer can only communicate with the current user.
For example, a channel connection could be used when a user wants to have a private chat with
a contact, or wants to send their location information to one or more contacts.
In diagram above, the current user A has invited users B, C, and D to the channel. Once the users
join, user A can send data to B, C, and D, but B, C, and D can only send data to A.
Supported Platform(s)
- BlackBerry OS 5.0+
API | OS 5.0 | OS 6.0 | OS 7.0 | PlayBook | Ripple |
---|---|---|---|---|---|
leave | 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 | OS 5.0 | OS 6.0 | OS 7.0 | PlayBook | Ripple |
---|---|---|---|---|---|
<feature id="blackberry.bbm.platform" /> | Y | Y | Y |
Permission Elements (PlayBook Only) |
---|
This API does not require a <permission> element to be declared in the configuration document of your BlackBerry WebWorks Application. |
API Summary
Functions
- Functions inherited from class blackberry.bbm.platform.io.Connection:
- add inviteContacts remove removeAll send
Events
- Events inherited from class blackberry.bbm.platform.io.Connection:
- ondata onuserdeclined onuserleft onusersinvited onusersjoined
Properties
- Properties inherited from class blackberry.bbm.platform.io.Connection:
- id joinedUsers pendingUsersCount
Constants
- Constants inherited from class blackberry.bbm.platform.io.Connection:
- MAX_COOKIE_LENGTH MAX_DATA_LENGTH MAX_INVITE_MSG_LENGTH MAX_USERS
leave
void leave() |
Supported Platform(s)
- BlackBerry OS 5.0+Description
Removes the current user from the connection, but leaves it active for all other participants.
onUserLeft will be called for all other users currently in the connection.
The connection will become inactive for the current user, and should not be used afterwards.
Throws | Description |
---|---|
IllegalStateException | if the current user has already left the connection. |