c# - UCMA 4.0 How to get user name from PresenceNotificationRecieved Handler -
i using ucma 4.0 presence status of user. have defined event handler so
_remotepresenceview.presencenotificationreceived += new eventhandler< remotepresentitiesnotificationeventargs>(remotepresence_presencenotificationreceived); its implementation follows:
// event handler process remote target's presence notifications private void remotepresence_presencenotificationreceived(object sender, remotepresentitiesnotificationeventargs e) { console.writeline(string.format("presence notifications received target {0}", <<how username here>> )); // notifications contain notifications 1 user. foreach (remotepresentitynotification notification in e.notifications) { if (notification.aggregatedpresencestate != null) { console.writeline("aggregate state = " + notification.aggregatedpresencestate.availability); } } console.writeline("press enter delete contact, delete group, , unsubscribe " + "presence of remote user."); } my question how username person whos persence notification has changed in event handler code?
there contactcard property on remotepresentitynotification class provide various details including displayname in case need reference notification.contactcard.displayname.
Comments
Post a Comment