Skip Navigation

Event_PC_RefreshContent

This notification notifies users that new content is available in the group discussion that they are a member of or following. 
Users receive this notification when other events such as pc.MessageReceived and pc.InvitationReceived couldn't be sent to the 
BlackBerry Connect
 app because the 
BlackBerry Connect
 app was in the background or the 
BlackBerry Connect
 service was restarted. If 
BlackBerry Connect
 app is in background, the notification is sent when the app comes to the foreground. If 
BlackBerry Connect
 service is restarted, the notification is sent when 
BlackBerry Connect
 app first connects.
This notification is only specified if a change is made to one of the parameters (for example, the refreshAll).
The following table lists the parameters that you can include in this method.  
Parameter
Type
Description
roomsWithNewMessages
Json Array 
This parameter specifies a list of group discussion IDs that include new messages for each group discussion. Each new messages includes the following parameters: 
Parameter
Type
Description
roomId
String
This parameter specifies the ID of the group discussion that includes new messages. 
newMessageCount
Number
This parameter specifies the number of new messages in the group discussion.
roomsInvitedTo
String
This parameter specifies a list of invitations that the users have received for group discussions. 
Parameter
Type
Description
roomId
String
This parameter specifies the ID of the group discussion. 
roomName
String
This parameter specifies the number of new messages in the group discussion.
roomDescription
String
This parameter specifies a description of the group discussion.
invitationId
Number
This parameter specifies the invitation ID for the group discussion the user is invited to join.
roomsWithParticipantChanges
String Array
This parameter specifies a list of group discussionIDs.
roomsWithSettingsChanges
Json Array
This parameter specifies a list of group discussions.
The following table describes the parameters that can be included in this parameter. The parameters are only included if the setting changes.
Parameter
Type
Description
roomId
String
This parameter specifies the ID of the group discussion. 
newRoomName
String
This parameter specifies the new name of the group discussion.
newCategoryId
String
This parameter specifies the new category ID for the group discussion.
newDescription
String
This parameter specifies the new description of the group discussion.
isDisabled
Boolean
This parameter specifies if the group discussion is disabled.
isMember
Boolean
This parameter specifies if the participant has been removed from the group discussion.
isManager
Boolean
This parameter specifies if the manager privileges for the group discussion have changed.
refreshAll
Boolean
Specifies that content might have changed, but the individual changes can't be sent. The 
BlackBerry Connect
 app should use other methods to query all of the changes. The 
BlackBerry Connect
 app re-sends the list of group discussions to mute to the 
Connect
 service when it receives this notification.

Code example

If the notification is successful, 
BEMS
 sends the following response to the 
BlackBerry Connect
 app specifying that new content is available. In the following example, a user receives a notification that new messages are available in two of the group discussions they are a member of and they received an invitation to another group discussion. 
{ "id":"S38", "error":null, "result": { "data": { "roomsWithNewMessages":[ { "roomId":"ma-chan://gems.example.net/646c79de-9bb9-4579-aae7-ece9d81d4ac4", "newMessageCount":103 }, { "roomId":"ma-chan://gems.example.net/c6b82877-a8c4-43bf-a451-7f794d1750e9", "newMessageCount":3 }], "roomsInvitedTo":[{ "roomId":"ma-chan://gems.example.net/0772c8f8-0763-47a8-a98d-478cfb389443", "roomName":"Project Discussion", "roomDescription":"Project Discussion", "invitationId":53, }], "method":"pc.RefreshContent" } }, "jsonrpc":"2.0" }