How to get a full user name (not chat id)

I am trying to get full user name of a gtalk id but i am only getting the chat id (message.getFrom() ) like xyz@gmail.com

…is there any way i can get full name (as shown in gtalk) rather nick/chatid via smack ??

You have to get the vCard. That a look at this:

org.jivesoftware.smackx.packet.VCard

I tried it but its displaying null

VCard vCard = new VCard();

//vCard.load(conn); // load own VCard

        vCard.load(connection, "xyz@gmail.com"); // load someone''s VCard

System.out.println(“first name via Vcard” + vCard.getFirstName() );

Output is

first name via Vcardnull

I don’‘t know what the official client is using (since I can’‘t use it on my Mac), it might help to use a packet sniffer to get the extension they’'re using for getting the full name. vCards are the system currently used for this kind of information by most clients (JEP-54).

Maybe the client even uses an HTTP-request to resolve it.