Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid: FTP-Connection does not work and can't show image via universal image loader
    primarykey
    data
    text
    <p>When I connect to my online ftp server (ftp.spicy-software.com) it does not work, no errors or crashes. just a blank layout. But when I connect to my LOCAL ftp server it works and the pictures will be shown. why??</p> <p>I am connecting to my local ftp server (Local-IP: 192.168.99.105) that works great and the pictures will be shown in the gridview:</p> <p><img src="https://i.stack.imgur.com/sW3H2.png" alt="enter image description here"></p> <pre><code> new FtpTask().execute(); private class FtpTask extends AsyncTask&lt;Void, Void, FTPClient&gt; { protected FTPClient doInBackground(Void... args) { //connectFTP("192.168.99.105", "Username", "Password", 21); connectFTP("ftp.spicy-software.com", "USername1", "Passweord", 21); return null; } protected void onPostExecute(FTPClient result) { Log.v("FTPTask","FTP connection complete"); } } </code></pre> <p>connectFTP() Function:</p> <pre><code> public void connectFTP(String host, String username, String password, int port){ try { FTPClient ftpClient = new FTPClient(); ftpClient.connect(host, port); ftpClient.enterLocalPassiveMode(); ftpClient.login(username, password); ftpClient.setFileType(FTPClient.BINARY_FILE_TYPE); ftpClient.changeWorkingDirectory("GetThePicture/pictures/"); Log.v("FTP STATUS: ",ftpClient.getStatus()); FTPFile[] files = ftpClient.listFiles(); for (FTPFile file : files) { Log.v("File: ", "http://spicy-software.com/GetThePicture/pictures/"+file.getName()); imageUrls.add("http://www.spicy-software.com/GetThePicture/pictures/"+file.getName()); imageNames.add(file.getName()); } Log.v("FILE_1: ", imageUrls.get(1)); } catch (Exception e) { Log.v("Error", ""+e); e.printStackTrace(); } } </code></pre> <p><strong>But when I try to connect to the ftp.spicy-software.com online ftp server it does not work:</strong></p> <p>LogCat:</p> <pre><code>05-01 15:31:50.280: D/AbsListView(2136): Get MotionRecognitionManager 05-01 15:31:50.345: D/libEGL(2136): loaded /system/lib/egl/libEGL_mali.so 05-01 15:31:50.350: D/libEGL(2136): loaded /system/lib/egl/libGLESv1_CM_mali.so 05-01 15:31:50.350: D/libEGL(2136): loaded /system/lib/egl/libGLESv2_mali.so 05-01 15:31:50.355: D/(2136): Device driver API match 05-01 15:31:50.355: D/(2136): Device driver API version: 10 05-01 15:31:50.355: D/(2136): User space API version: 10 05-01 15:31:50.355: D/(2136): mali: REVISION=Linux-r2p4-02rel0 BUILD_DATE=Tue Oct 16 15:37:13 KST 2012 05-01 15:31:50.390: D/OpenGLRenderer(2136): Enabling debug mode 0 05-01 15:31:53.605: V/FTP STATUS:(2136): 211-Status of 'ftp.easyname.eu' 05-01 15:31:53.605: V/FTP STATUS:(2136): 211-Connected from 109.164.221.167 (109.164.221.167) 05-01 15:31:53.605: V/FTP STATUS:(2136): 211-Logged in as 35221ftp1 05-01 15:31:53.605: V/FTP STATUS:(2136): 211-TYPE: BINARY, STRUcture: File, Mode: Stream 05-01 15:31:53.605: V/FTP STATUS:(2136): 211-No data connection 05-01 15:31:53.605: V/FTP STATUS:(2136): 211 End of status 05-01 15:31:53.910: W/dalvikvm(2136): dvmFindClassByName rejecting 'UNIX Type: L8' 05-01 15:31:55.285: D/dalvikvm(2136): GC_CONCURRENT freed 167K, 10% free 12399K/13703K, paused 4ms+2ms, total 24ms 05-01 15:31:55.775: V/File:(2136): http://spicy-software.com/GetThePicture/pictures/1.jpg 05-01 15:31:55.775: V/File:(2136): http://spicy-software.com/GetThePicture/pictures/2.jpg 05-01 15:31:55.775: V/File:(2136): http://spicy-software.com/GetThePicture/pictures/3.jpg 05-01 15:31:55.775: V/File:(2136): http://spicy-software.com/GetThePicture/pictures/4.jpg 05-01 15:31:55.775: V/File:(2136): http://spicy-software.com/GetThePicture/pictures/5.jpg 05-01 15:31:55.775: V/File:(2136): http://spicy-software.com/GetThePicture/pictures/6.jpg 05-01 15:31:55.775: V/File:(2136): http://spicy-software.com/GetThePicture/pictures/7.jpg 05-01 15:31:55.775: V/File:(2136): http://spicy-software.com/GetThePicture/pictures/8.jpg 05-01 15:31:55.775: V/FILE_1:(2136): http://www.spicy-software.com/GetThePicture/pictures/2.jpg 05-01 15:31:55.780: V/FTPTask(2136): FTP connection complete </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload