Hover cards display enhanced presence of a user in Sametime Connect buddy list. This article demonstrates the ease of using hover cards in your plug-ins.
Step1: Add following dependencies to the plug-in:
Step2: Add following import statements in the java class:
Step3: Create Person object for the user for which the hover card will be displayed using the People Service. For creating the person object we require user STID and community id. Community id can be retrieved using the CommunityServiceInternal object.
PeopleService peopleService = (PeopleService) ServiceHub.getService(PeopleService.SERVICE_TYPE);
Person person = peopleService.getPerson(<User STID>,<Community ID>,false);
Step4: Finally, to display hover card we need to create HoverBusinessCard instance as specified in the following snippet:
HoverBusinessCard hoverBusinessCard = new HoverBusinessCard(this.getShell(), <Person Object created in step3>,"");