Problem using AndFTP for downloading from FTP

FTP client for Android handsets.
Post Reply
a_rajeraja
Posts: 1
Joined: Thu Nov 24, 2011 12:19 pm
AntiSpam sum: 8

Problem using AndFTP for downloading from FTP

Post by a_rajeraja »

Hi,

I am trying to download from an Ftp site to sdcard. When I try to run the sample given it throws ActivityNotFoundException. The exception message is below;

11-24 17:55:22.319: DEBUG/Download File--->(25543): No Activity found to handle Intent { act=android.intent.action.PICK dat=ftp://ftp.eminenttech.com typ=vnd.android.cursor.dir/lysesoft.andftp.uri (has extras) }

My Code;

Intent intent = new Intent();
intent.setAction(Intent.ACTION_PICK);
Uri ftpUri = Uri.parse("ftp://ftp.eminenttech.com");
intent.setDataAndType(ftpUri, "vnd.android.cursor.dir/lysesoft.andftp.uri");
// Download
intent.putExtra("command_type", "download");
// FTP credentials (optional)
intent.putExtra("ftp_username", "888888");
intent.putExtra("ftp_password", "8888");
// FTP settings (optional)
intent.putExtra("ftp_pasv", "true");
intent.putExtra("ftp_resume", "true");
// Activity title
intent.putExtra("progress_title", "Downloading files ...");
// Remote files to download.
intent.putExtra("remote_file1", "/Image.zip");
// Target local folder where files will be downloaded.
intent.putExtra("local_folder", "/mnt/sdcard/download");
intent.putExtra("close_ui", "true");
startActivityForResult(intent, DOWNLOAD_FILES_REQUEST);


My manifest;

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="test.andftpclient" android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="7" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name="test.andftpclient.MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.PICK" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.dir/lysesoft.andftp.uri" />
</intent-filter>
</activity>

</application>
</manifest>

Please let me know where I am going wrong.

Thanks, Ananth

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

Re: Problem using AndFTP for downloading from FTP

Post by support »

It looks good according to sample provided:
http://www.lysesoft.com/products/andftp/intent.html

Which version of AndFTP are you using?

Post Reply