0

I've changed my asmack library from asmack-issue15.jar to asmack-android-7.jar from Flowdalic/asmack project. Everything runs smooth, but I've a problem with the filetransfer from my server to the android smartphone. The status of the transfer gets never done because it loops in the state "In Progress".

Registered extensions:

providerM.addIQProvider("si", "http://jabber.org/protocol/si", new StreamInitiationProvider());
providerM.addIQProvider("query", "http://jabber.org/protocol/bytestreams", new BytestreamsProvider());
providerM.addIQProvider("open", "http://jabber.org/protocol/ibb", new OpenIQProvider());
providerM.addIQProvider("close", "http://jabber.org/protocol/ibb", new CloseIQProvider());
providerM.addExtensionProvider("data", "http://jabber.org/protocol/ibb", new DataPacketProvider());

Code to receive a file:

File f = new File(PATH_SDCARD + "/tmp/" + request.getFileName());
IncomingFileTransfer transfer = request.accept();
transfer.recieveFile(f);
int cnt = 0;

while(!transfer.isDone() && cnt < 20) {
   cnt++;
   Log.i(LOG, "STATUS: " + transfer.getStatus().toString());
   Log.i(LOG, "SIZE: " + f.length());
   Log.i(LOG, "PROGRESS: " + transfer.getProgress());
   Thread.sleep(1000);
}
if (transfer.getError() != null) {
   Log.i(LOG, "ERROR: " + transfer.getError());
}
if (transfer.getException() != null) {
   Log.i(LOG, "EXCEPTION: " + transfer.getException());
}

Whats wrong here?

Flow
  • 23,572
  • 15
  • 99
  • 156
sbo
  • 951
  • 2
  • 12
  • 25
  • 1
    I can only repeat myself again and again. [Without a XMPP stanza trace no one is able to tell you what is going wrong. And if you have your stanzas trace, thanks to the open nature of XMPP, you can find out what is going wrong by yourself.](https://github.com/Flowdalic/asmack/wiki/aSmack-XMPP-File-Transfer) – Flow Sep 27 '12 at 08:27
  • hey, it was an server issue, I enabled proxy file transfer in openfire and now everything works. Thanks – sbo Sep 27 '12 at 20:20

1 Answers1

0

It was an server issue. I enabled file transfer proxy in openfire and now everything works.

sbo
  • 951
  • 2
  • 12
  • 25