METHOD_AddGroup
This method adds a group to the BlackBerry Connect app contact list.
The following table describes the parameters that you can include in this method.
|
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
groupName |
String |
√ |
Specifies the group name to add to the contact list. |
| dependencies | String | — | This parameter specifies the other methods that this method is dependent on. |
BEMS response and notification
The following table describes the parameters that BEMS returns and the notification sent to the BlackBerry Connect app when a group is added.|
Parameter |
Type |
Description |
|---|---|---|
|
method |
String |
This parameter specifies the invoked method (for example, AddGroup). |
| state | String | This parameter specifies the state of the request to BEMS (for example, Processing and Complete). |
| message | String | This parameter specifies the message that is sent to the BlackBerry Connect app with the notification. |
Code example
The following example sends a request to BEMS to add the group, "TeamBuilding", to the user's BlackBerry Connect app contact list.
{
"method":"AddGroup",
"params":
{
"groupName":"TeamBuilding"
},
"id":"c55",
"jsonrpc":"2.0"
}
If the request is successful, BEMS returns the following response to the BlackBerry Connect app and processes the request.
{
"id":"c55",
"error":null,
"result": {
"data":
{
"method":"AddGroup",
"state":"PROCESSING"
}
},
"jsonrpc":"2.0",
"background": true
}
If there are no errors, the BEMS returns the following notification to the BlackBerry Connect app and adds the group.
{
"id": "c55",
"sequence":1018547700000027,
"result":
{
"data":
{
"message":"The group name exampleGroup is created",
"method":"AddGroup",
"state":"COMPLETE"
}
},
"jsonrpc": "2.0"
}