Not able to receive files in smack 3.1!

Hello all,

I have intergrated smack(version 3.1) API for gmail in my project.Intially i was not supporting file transfers but now I am planing to implement file transfers(send and receive) . Receving a file works fine but the problem is when I send file to friends. It is mentioned that in Smack version 3.2 the file tranfer problem is fixed( i didnt check)…since I have intergrated version 3.1 I want to know if there are any possible way to fix this issue in Smack version 3.1 itself…Please find the code below that I use to send file .

//ftMan – file transfer manager instance

FileTransferNegotiator.setServiceEnabled(util.connection, true);

            OutgoingFileTransfer oft = ftMan.createOutgoingFileTransfer("");

if(oft != null)


oft.sendFile(new File("./"), “Test transfer!”);

while (!oft.isDone())


if (oft.getStatus().equals(FileTransfer.Status.error))


System.out.println("ERROR!!! " + oft.getError());





System.out.println(“5 sec sleep”);



if (oft.getStatus().equals(FileTransfer.Status.complete))


System.out.println(“Transfer done”);


if (oft.getStatus().equals(FileTransfer.Status.error))

System.out.println("Transfer failed: " + oft.getError());

Output: Transfer Failed.

Please let me know the solution.thanks in advance. (18008 Bytes) (1836 Bytes)

Actually, you will need version 3.2.1 for file transfer.

There are no plans to do any updates to older version. That is what the newer version are for

What is the problem with upgrading to the latest version?

Thanks for your reply… Like I said I have interegrated smack version 3.1 in my project,so it will be real hard to roll up to version 3.2.I have to change alot.So thats what I was thinking if there is anyway to make it work in version 3.1.

I assume this means that you have a customized version of Smack then, as that, as far as I can tell is the only thing that would keep you from upgrading. You use the term ‘integrated’, but I am not sure what you mean by that, since the typical case is to simply have a jar dependency.

To my knowledge there are no API changes between 3.1 and 3.2.x. so jar dependencies would be unaffected.

Thanks for you reply rcollier.Actually the version that I have used is smack 3-0-4,I guess it does have lot of api changes.