file transfer issue using smack api
<p>i am doing file transfer using smack api and open fire xmmp server ,
 i did code for sending the file as</p>

<pre><code>try {
        servicemanager = new ServiceDiscoveryManager(connection);
        manager = new FileTransferManager(connection);
        FileTransferNegotiator.setServiceEnabled(connection, true);
        OutgoingFileTransfer transfer = manager
                .createOutgoingFileTransfer(receid);
        System.out.println(connection);
        transfer.sendFile(new File(comppath), "hi");
        while (!transfer.isDone()) {

            Toast.makeText(this,
                    "status." + transfer.getStatus().toString(),
                    Toast.LENGTH_LONG).show();

            // System.out.println(transfer.getStreamID() + " is done!");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                Toast.makeText(this, "corrupted..", Toast.LENGTH_LONG)
                        .show();
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }
</code></pre>

<p>and in <code>public void onCreate(Bundle icicle)</code> i did lisener for filetransfer as</p>

<pre><code>super.onCreate(icicle);
servicemanager = new ServiceDiscoveryManager(connection);
    FileTransferNegotiator.setServiceEnabled(connection, true);

    manager = new FileTransferManager(connection);

    manager.addFileTransferListener(new FileTransferListener() {
        public void fileTransferRequest(FileTransferRequest request) {
            Log.d("", "allows file...");
            if (request != null) {
                // Accept it
                IncomingFileTransfer transfer = request.accept();
                try {

                    /*String pathsd = Environment
                            .getExternalStorageDirectory().toString();*/

                    String path = "/sdcard/"+ request.getFileName();
                    transfer.recieveFile(new File(path));

                    // transfer.recieveFile(new
                    // File(request.getFileName()));
                    // System.out.println("File " +
                    // request.getFileName() + "Received Successfully");
                    Log.d("", "rece: " + request.getFileName());
                    Log.d("", "path: " + request.getFileName());
                    // InputStream input = transfer.recieveFile();
                } catch (XMPPException ex) {
                    Log.d("", "er: " + ex);
                }
            } else {
                Log.d("", "reject file...");
                request.reject();
            }
        }
    });
</code></pre>

<p>here the lisener not responding anything..at another side..</p>

<p>wat's my wrong..</p>

<p>thanks in advance.</p>
