Question

I am not able to get the vcard information.

i have tried both methods,

VCard card = new VCard();
card.load(connection);
Log.i("VCARD", card.getFirstName());

During this i got that timeout error.....

Plus also have tried this.... before making a connection.

configure(ProviderManager.getInstance());

public void configure(ProviderManager pm) {
    pm.addIQProvider("vCard", "vcard-temp", new VCardProvider());
}

final IQ iq = new IQ() {
public String getChildElementXML() {
return "<iq from='test@xx.xx.xx.xx' id='v1' 
type='get'><vCard xmlns='vcard-temp'/>    
</iq>";
 }
};

iq.setType(IQ.Type.GET);
connection.sendPacket(iq);
connection.addPacketListener(new MyPacketListener(),new   PacketTypeFilter(IQ.class));

Please guide me how to get VCARD Information.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top