aspose file tools*
The moose likes Android and the fly likes FTP downloading issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "FTP downloading issues" Watch "FTP downloading issues" New topic
Author

FTP downloading issues

Sean Michael Hayes
Ranch Hand

Joined: Feb 08, 2012
Posts: 54

A problem that has been frustrating me for the last few days is downloading from an FTP for my Android app. Up till now, the app has been reading from local files to get its data but the final version shall read the files on a FTP server. The problem is that while the experiment app I made can connect to the server, downloading seems to not work. No file is downloaded at all, knowing me Im probably missing something obvious.

My onCreate



Names hidden to protect identity :p


And the download method



I think the problem is in the path to the sdcard but im not entirely sure.......
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 344

Could the issue be related to Active vs Passive FTP? Sometimes only one or the other works.
Sean Michael Hayes
Ranch Hand

Joined: Feb 08, 2012
Posts: 54

I was working on it a bit more yesterday and noticed two things:

1.On the path I specify in the download method to download the file from the server to, an empty text file is created with the name of the file I want to to download. If I do not give a file name in the destination path I get a (Is a Directory error, which is caused by not specifying an actual file from what I understand)

2.My connection method causes the client to enter passive method after conecting to the server so it might not be that.

Here's my connection method:

 
Don't get me started about those stupid light bulbs.
 
subject: FTP downloading issues