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(); } } }); }