Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to write ftp code in android

 
Suzzane Pinto
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello friends,

i am developing an andriod application to transfer some images to the server,i am able to select images but really not aware of transfering it to the ftp server
can someone please help.???please
 
Tim Moores
Bartender
Posts: 2848
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Instead of reinventing the wheel, you should be able to use the Apache Commons Net library.
 
Suzzane Pinto
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have used common.net library but dont know why images are not uploaded to the server.code has no errors.
please do the needfull,attached is my code
using andriod version 2.1

the ftp code is

 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to be careful about posting login information; I have removed those from your post.

You need to set the file type to binary for images and other non-text files. If that doesn't fix the problem, tell us what, exactly, "images are not uploaded to the server." means.
 
Suzzane Pinto
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thankyou for the last post
I have done exactly what you said in the above code at line 56. still the images are not uploaded to the server.
what i want to do is,uploaded multiple images to my ftp server.
the code shows no errors and also it is running fine with netbeans for simple application of transfering image to server but not in andriod.
what would be the problem iam not getting
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic