METHOD_GetContactList
This method retrieves the contact list of the user.
The following table describes the parameters that you can include in this method.
Parameter | Type | Required | Description |
---|---|---|---|
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 when the BlackBerry Connect
app retrieves the user's contact list and the notification that is sent to the BlackBerry Connect
app.Parameter | Type | Description |
---|---|---|
method | String | This parameter specifies the invoked method (for example, GetContactList). |
state | String | This parameter specifies the state of the request to BEMS (for example, Processing and Complete). |
contacts | Object | This parameter specifies the key value pair of the contacts for the user. The key values are the SIP URI for each contact. |
Code example
The following example sends a request to
BEMS
to retrieve all contacts in the user's contact list. { "method":"GetContactList", "params":{}, "id":"c11", "jsonrpc":"2.0" }
If the request is successful,
BEMS
returns the following response to the BlackBerry Connect
app.{ "id":"c11", "error":null, "result": { "data": { "method":"GetContactList", "state":"PROCESSING" } }, "jsonrpc":"2.0" }
If there are no errors,
BEMS
sends the following notification to the BlackBerry Connect
app and the user's contact list is displayed.{ "id":"c11", "sequence":1018528500000011, "result": { "data": { "contacts":{}, "method":"GetContactList", "state":"COMPLETE" } }, "jsonrpc":"2.0" }