syntax

FTP client for Android handsets.

syntax

Postby daveyah » Fri Jul 11, 2014 5:40 pm

Hi,

I have an ftp setup on my home network and connect AndFTP to the running server to download files.

However I am trying to do this via adb.
It connects to the server using alias and shows me the current directory but no download.

adb shell am start -a android.intent.action.PICK alias://TestFTP -t vnd.android.cursor.dir/lysesoft.andftp.uri -es command_type download -es remote_file1 = images/car.jpg -es local_folder = /sdcard/Download

Can someone point out where I am going wrong? Have I missed something out?
daveyah
 
Posts: 6
Joined: Thu Jun 27, 2013 1:55 pm

Re: syntax

Postby support » Wed Jul 16, 2014 5:50 pm

Did you have a look to: http://www.lysesoft.com/products/andftp/intent.html
There is a sample code for file download.
support
 
Posts: 1010
Joined: Sun Apr 20, 2008 4:40 pm

Re: syntax

Postby daveyah » Tue Jul 22, 2014 1:53 pm

Hi,

yes. Unfortunately I don't know how to figure out the syntax for the StartAcvtivityForResult part from the information shown.
daveyah
 
Posts: 6
Joined: Thu Jun 27, 2013 1:55 pm

Re: syntax

Postby daveyah » Thu Jul 24, 2014 1:29 pm

Getting there....

Here's the syntax to open and start download.

adb shell am start -a android.intent.action.PICK -d ftp://192.168.1.66 -t vnd.android.cursor.dir/lysesoft.andftp.uri --es ftp_username "test" --es ftp_password "test" --es command_type "download" --es progress_title "Downloading file ..." --es remote_file1 "images/test.mp3" --es local_folder /sdcard/Download --es close_UI "true"

However I get the following error once it has started:
Download failed .java.io.IOException:BufferedInputStream is Closed

This suggests the code has also closed the stream. Any ideas?
daveyah
 
Posts: 6
Joined: Thu Jun 27, 2013 1:55 pm

Re: syntax

Postby daveyah » Thu Jul 24, 2014 1:56 pm

Forget that last one.
This was a file not found error on the server caused by missing forward slash.

/images/test.mp3

without that it was trying to find file in images/images/test.mp3

So downloading ok.

Full command line for anyone interested:
In this case FTP server root folder contains images folder with file- test.mp3 in.

adb shell am start -a android.intent.action.PICK -d ftp://192.168.1.66 -t vnd.android.cursor.dir/lysesoft.andftp.uri --es ftp_username "test" --es ftp_password "test" --es command_type "download" --es progress_title "Downloading file ..." --es remote_file1 "/images/test.mp3" --es local_folder /sdcard/Download --es ftp_overwrite "overwrite" --es close_UI "true"
daveyah
 
Posts: 6
Joined: Thu Jun 27, 2013 1:55 pm

Re: syntax

Postby support » Sat Aug 02, 2014 10:37 am

Great
support
 
Posts: 1010
Joined: Sun Apr 20, 2008 4:40 pm


Return to AndFTP



cron

Sitemap | Privacy Statement | Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc.
in the U.S. and other countries. All other company and/or product names are the property of their respective owners.