Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FTP downloading issues

 
Sean Michael Hayes
Ranch Hand
Posts: 54
Android
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 344
Java Linux Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could the issue be related to Active vs Passive FTP? Sometimes only one or the other works.
 
Sean Michael Hayes
Ranch Hand
Posts: 54
Android
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic