Skip to main content
Version: 5.7.0

UpdateActivity

Update the presence data activity field for the caller. Note that Support rich activity must be enabled in order for this API call to work (see Messaging > Presence in the portal). An RTT event will be sent to any registered listeners of the caller with their updated presence info.

ServiceOperation
presenceUPDATE_ACTIVITY

Method Parameters

ParameterDescription
activityPresence activity record json. Size of the given activity must be equal to or less than the Max content size (bytes) app setting (see Messaging > Presence in the portal).

Usage

http://localhost:3000
string activity = "{ \"LOCATION\": \"POKER_TABLE\", \"STATUS\": \"PLAYING_GAME\"}";
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.UpdateActivity(activity, successCallback, failureCallback);
JSON Response
{
"data": null,
"status": 200
}