Documentation

Support

Vivox Core SDK

Vivox Core SDK

Buddy presence changes

Review valid online states for the presence system.
Read time 1 minuteLast updated a day ago

After User B has approved User A as a buddy, User A can see changes to User B's online status. Online status consists of two pieces of information: an online state and a custom message. The following list details valid online states:
  • buddy_presence_offline = 0
  • buddy_presence_online = 1
  • buddy_presence_busy = 2
  • buddy_presence_chat = 3
  • buddy_presence_away = 4
  • buddy_presence_extended_away = 5
You can use any text for the custom message, but it must be UTF-8 encoded. Whenever User B changes this information, User A receives a vx_evt_buddy_presence message. The following code displays an example of the process for handling this message:
void HandleEvtBuddyPresence(vx_evt_buddy_presence *evt){ printf("%s is now %s (%s)\n", evt->encoded_uri_with_tag,vx_get_presence_state_string(evt->presence), evt->custom_message);}