Skip to main content
Version: 5.9.0

RegisterListenersForProfiles

Registers the caller for RTT presence updates for the given profileIds. If bidirectional is set to true, then also registers the targeted users for presence updates from the caller.

ServiceOperation
presenceREGISTER_LISTENERS_FOR_PROFILES

Method Parameters

ParameterDescription
profileIdsArray of target profile IDs.
bidirectionalShould those profiles be mutually registered to listen to the current profile?

Usage

http://localhost:3000
List<string> profileIds = new List<string>{ "aaa-bbb-ccc-ddd" };
bool bidirectional = true;
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};

_bc.PresenceService.RegisterListenersForProfiles(profileIds, bidirectional, successCallback, failureCallback);
JSON Response
{
"data": {
"presence": [
{
"user": {
"id": "aaa-bbb-ccc-ddd",
"name": "",
"pic": null,
"cxs": [
"22284:fb416888-e76d-425d-a06d-a5529bdba8d9:id58ohotujj893gomctos244al"
]
},
"online": true,
"summaryFriendData": {},
"activity": {
"LOCATION": "POKER_TABLE",
"STATUS": "PLAYING_GAME"
}
}
]
},
"status": 200
}