METHOD_SetPresence
This method sets the presence status for the user. This method is called 'status' by
Microsoft
.Parameter | Type | Required | Description |
---|---|---|---|
presence | String | √ | This parameter specifies the user's presence (for example, available, busy, or away). |
personalMessage | String | — | This parameter specifies the user's personal message (for example, I am in a meeting). |
dependencies | String | — | This parameter specifies the other methods that this method is dependent on. It specifies the comma delimited dependent request ids. |
reconnect | String | — | This parameter specifies that the BlackBerry Connect app re-establish the existing session. For example, if BlackBerry Connect goes to the background, when it comes to the foreground the same session is continued. |
BEMS response and notification
BEMS
response and notificationThe following table describes the parameters that
BEMS
returns and the notification to send to the BlackBerry Connect
app when the user sets their presence status.Parameter | Type | Description |
---|---|---|
method | String | This parameter specifies the method that is invoked (for example, SetPresence or Complete). |
state | String | This parameter specifies the state of the request to BEMS (for example, Processing or Complete). |
Code sample
The following example sends a request to
BEMS
to set the user's presence and specify a personal message.{ "method":"SetPresence", "params": { "presence":"busy", "personalMessage":"I am in meeting", }, "id":"c7", "jsonrpc":"2.0" }
If the request is successful,
BEMS
sends the following response to the BlackBerry Connect
app and processes the request.If there are no errors,{ "id":"c7", "error":null, "result": { "data": { "method":"SetPresence", "state":"PROCESSING" } }, "jsonrpc":"2.0", "background";false }
BEMS
sends the following notification to the BlackBerry Connect
app and displays the presence status and sets the personal message.
{ "id":"c7", "sequence":1018697900000054, "result": { "data": { "method":"SetPresence", "state":"COMPLETE" } }, "jsonrpc":"2.0" }