Tuesday, November 4, 2014

Using Yowsup to send contacts

Contacts are referred to as Vcards inside the library, so I'll refer them as Vcards from the next sentence on. Vcards work in the same way as location, as both of them do not need the media request, media upload, send media chain. A call to message_vcardSend will do. message_vcardSend accepts 3 parameters: JID of person to send to, data, and name. I had no idea what data is, so I started off writing a listener for Vcards instead, to learn the format of the data parameter.


I've included the files for the listener below.

Following the format as shown above, I wrote the code for sending Vcards. It generally works, but occasionally, the send doesn't get through and the receiver will receive nothing. If anyone can pinpoint why this happens please enlighten me.




Files:





No comments:

Post a Comment