Skip Navigation

METHOD_UnRegisterTempRemotePresence

This method sends an unregister request to 
BEMS
 to stop receiving a remote user's presence status and container changes. 
The following table describes the parameters that you can include in this method.
Parameter
Type
Required
Description
contactId
String 
This parameter specifies the ID of the user to unregister.
dependencies
String
This parameter specifies the other methods that this method is dependent on. It specifies the comma delimited dependent request IDs.
state
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

The following table describes the body properties that 
BEMS
 returns and the notification to send to the 
BlackBerry Connect
 app when the user stops receiving a contact's presence status.
Parameter
Type
Description
method
String
This parameter specifies the invoked method (for example, UnRegisterTempRemotePresenceSubscription).
state
String
This parameter specifies the state of the request to 
BEMS
 (for example, Processing or Complete).  
message
String
This parameter specifies the message that is sent to the 
BlackBerry Connect
 app.

Code example

The following example sends a request to 
BEMS
 to unregister "user33's" presence in the 
BlackBerry Connect
 app contact list.
{ "method":"UnRegisterTempRemotePresenceSubscription", "params": { "contactIds":{"user33@example.com}" }, "id":"c12", "jsonrpc":"2.0", }
If the request is successful, 
BEMS
 sends the following response to the 
BlackBerry Connect
 app and processes the request.
{ "id":"c12", "error":null, "result": { "data": { "method":"UnRegisterTempRemotePresenceSubscription", "state":"PROCESSING" } }, "jsonrpc":"2.0", "background":false }
If there are no errors, 
BEMS
 sends the following notification to the 
BlackBerry Connect
 app and the presence status is temporarily removed from the contact.
{ "id":"c12", "sequence":1018699900000077, "result": { "data": { "method":"UnRegisterTempRemotePresenceSubscription", "state":"COMPLETE" } }, "jsonrpc":"2.0", }