githubw2015 / asmack

一个小的例子
https://github.com/githubw2015/asmack
Other
0 stars 0 forks source link

FileTransfer doesn't work #73

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

I pushed  smack.properties into "/META-INF/" folder of my asmack jar file.

and I replaced the code for  
org.jivesoftware.smackx.filetransfer.Socks5TransferNegotiator.discoverLocalIP() 
as this link said.

http://code.google.com/p/asmack/issues/detail?id=61

and you know my codes like blew:

        final FileTransferManager fileTransferManager = new FileTransferManager(xmppConnectionAdapter.getAdaptee());

        final OutgoingFileTransfer fileTransfer = fileTransferManager.createOutgoingFileTransfer(mContact.getJIDWithRes()+"/Rooyee");               
        final File file = new File(filepath);

        try {
            fileTransfer.sendFile(file, "Sending");

            fileTransferManager.addFileTransferListener(new RecFileTransferListener());

but the status is always equals with the 
FileTransfer.Status.negotiating_stream, and no file can be received by another 
client.

Original issue reported on code.google.com by alanw...@gmail.com on 19 Jul 2012 at 8:05