This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Android and the fly likes how to write ftp code in android Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "how to write ftp code in android" Watch "how to write ftp code in android" New topic
Author

how to write ftp code in android

Suzzane Pinto
Ranch Hand

Joined: Feb 10, 2012
Posts: 213
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
Rancher

Joined: Sep 21, 2011
Posts: 2408
Instead of reinventing the wheel, you should be able to use the Apache Commons Net library.
Suzzane Pinto
Ranch Hand

Joined: Feb 10, 2012
Posts: 213
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
Marshal

Joined: Mar 22, 2005
Posts: 41073
    
  43
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.


Ping & DNS - my free Android networking tools app
Suzzane Pinto
Ranch Hand

Joined: Feb 10, 2012
Posts: 213
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
 
Don't get me started about those stupid light bulbs.
 
subject: how to write ftp code in android
 
Similar Threads
Does Android Support SVG ?
Is it a good desicion to learn Andriod
Andriod - UI Toolkit
Andriod Apps/Module development market
Is there any certification course in Andriod ?