Smack 4.1.0 alpha6 File Transfer Issues

I have been having an issue with file transfer for file mime types other than .txt . I have tried sending a .mp3 file from spark to my android client and that creates a crash when I try to read the mime type of the file. I can successfully send .txt files but not .mp3 files. Is there something I am missing or is this a bug?

After much testing it turns out that all files except text files have this issue and are stuck in negotiating mode

and that creates a crash

How to ask for help or report an issue · igniterealtime/Smack Wiki · GitHub

@Override

public void fileTransferRequest( FileTransferRequest request ) {

Log.e( “FILE TRANSFER MANAGER”, request.getMimeType() ); //null pointer exception here when I try to receive any file other than text (.txt) file type

IncomingFileTransfer fileTransfer = request.accept();

fileTransfer.recieveFile( fileSaved );

}

In my porject I will need to get the mimetype of the file being received. If i bypass the mimetype check the file will stay as 0bytes in size which seems that the transfer is not taking place. My apologies for the bad question format learning as I go in this community.

I find it unlikely that request is null, but I can’t rule out the possibility, especially when alpha versions are used. Of course a stacktrace of the NPE would maybe give some insights. But generally I can only point you to

Smack XMPP File Transfer · igniterealtime/Smack Wiki · GitHub

which basically says that Smack is open source and XMPP is an open standard, you are therefore able and encouraged to debug the issue yourself.

I will have a deeper look into this. Thanks though