I am using a test program to send file to Spark client but i get the following error on the debug window from my test program:
Debug:
Sent:
test filehttp://jabber.org/protocol/bytestreamshttp://jabber.org/protocol/ibb
receive:
test filehttp://jabber.org/protocol/bytestreamshttp://jabber.org/protocol/ibb
I can chat fine with the client but when sending file the client doesn’t even receive an incoming file transfer notice!
Here is my code for sending file:
public void sendFile(String to) {
File file = new File("Firefox_wallpaper.png");
if (file != null) {
FileTransferManager fileXferManager;
fileXferManager = new FileTransferManager(connection);
fileXferManager.addFileTransferListener(this);
if (fileXferManager != null) {
OutgoingFileTransfer transfer = fileXferManager.createOutgoingFileTransfer(to);
OutgoingFileTransfer.setResponseTimeout(60000);
try {
transfer.sendFile(file,“test file”);
} catch (XMPPException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
Connection info:
ConnectionConfiguration config = new ConnectionConfiguration(“openfire”,5222, “openfire”);
connection = new XMPPConnection(config);
connection.connect();
connection.login(“test1”, “password”);
do i need to send to a different port or have some sort of transaction before send? i am a bit stuck… thanks!