-1

I need to retrieve some photos from a FTP server and I wanted to use UIL to do that.

I tried the following code :

String photoURI = "ftp.cluster123.ovh.net/photos/myphoto.jpg";
ImageLoader.getInstance().displayImage(photoURI, photoImageView);

But I get the following errors :

04-23 10:04:53.028: E/ImageLoader(3712): UIL doesn't supportScheme(protocol) by default
[ftp.cluster123.ovh.net/photos/myphoto.jpg]. You should implement this support
yourself (BaseImageDownloader.getStreamFromOtherSource(...))
04-23 10:04:53.028: E/ImageLoader(3712): java.lang.UnsupportedOperationException: UIL
doesn't support scheme(protocol) by default [ftp.cluster123.ovh.net/photos/myphoto.jpg].
You should implement this support yourself (BaseImageDownloader.getStreamFromOtherSource(...))

How should I proceed to connect to the FTP server only when the photo is not already cached ? What URI should I use ? Should I keep the FTP server or consider another way of storing photos online ?

Thanks

1 Answers1

0

How should I proceed to connect to the FTP server

You follow the instructions in the error message and create your own FTP "plugin", of sorts, to UIL. Since Android has no FTP client in the Android SDK, you would need to find an FTP client library and write the bridge code to connect it to UIL.

Should I keep the FTP server or consider another way of storing photos online ?

I was not aware that anybody used FTP servers anymore. Generally speaking, a Web server will be a more common solution here.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491