Java 类org.jivesoftware.smackx.filetransfer.FileTransferListener 实例源码

项目:NewCommunication-Android    文件:XmppManager.java   
public void getFile(){

    manager.addFileTransferListener(new FileTransferListener() {

    @Override
    public void fileTransferRequest(FileTransferRequest request) {

        IncomingFileTransfer fileTransfer = request.accept();

        try {
            fileTransfer.recieveFile(new File(Environment.getExternalStorageDirectory().getAbsolutePath(), "�����ļ�"));
        } catch (XMPPException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

    }
});
  }