gmail - How to send files using Smack? -


i struggling code:

filetransfermanager manager = new filetransfermanager(connection)  outgoingfiletransfer transfer = manager.createoutgoingfiletransfer("gmailusername@gmail/smack");   try {    system.out.println("000");    transfer.sendfile(new file("d:/cow.wav"), "moo !");    system.out.println("111");     while(!transfer.isdone()) {      system.out.println(transfer.getprogress() + " done!");         //system.out.println(transfer.getstreamid() + " done!");       try {        thread.sleep(1000);      }      catch (interruptedexception e) {        // todo auto-generated catch block e.printstacktrace();      }   }  }  catch (xmppexception e) {    // todo auto-generated catch block e.printstacktrace();  } 

it seams can't send file.

can me solve problem ?

i believe gmail (judging code above) not support file transfer. see this. can send disco#item , disco#info see if supports kind of byte stream proxy. servers jabber.org not return disco#info on proxies.

for querying xmpp services see blog.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -

PostgreSQL 9.x - pg_read_binary_file & inserting files into bytea -