how to know if a friend is online or not

InGameDev
edited March 2015 in Photon Chat
i am using photon chat. i have added some friends and can message them as private message.
but i want to show if that friend is online or not.
i have gone through syntax of FriendInfo , but can not figure out how to use it.
any small example of knowing some specific client is online or not will be really helpful.
thank you

Comments

  • You can subscribe to status updates from friends by using AddFriends(string[] friends). Simply submit a list of userIDs of friends and you get their state updates.
    When a friend goes on or off or changes state, the others get a call to OnStatusUpdate(user, status, gotMessage, message) (which you implement).
    You have to store the current state of friends yourself.
  • that is done..i can have status update....but when i go online how to get info about already online friends?
  • anything?
  • when you send list of friends to server. you should get back info about status of every of them
  • I have added friends by using
    this.chatClient.AddFriends(fbFriendsidList);

    which callback i will receive about status of every of them?
  • IChatClientListener.OnStatusUpdate
  • IChatClientListener.OnStatusUpdate
    is not showing every time.... prob is accruing in showing online friends
  • Not sure what you mean