How do I notify the user that an FTP file is up to date?

2

I'm developing an android application that lists and opens files from a directory via FTP

I need my application to notify the user that there is an updated version of a file by means of a toast or any other form, that is, when I open the application it will appear a message "example.pdf is updated"

Does anyone know how to do this?

    
asked by anonymous 26.05.2014 / 15:19

2 answers

1

You need a library that provides an API to access the FTP server and return the necessary information regarding the files in it. So every time your application runs, it will connect to FTP, read the information about the files (timestamp, etc.) and inform the user if there is any news regarding the file stored locally.

Try for example the Apache Commons FTP client: link

Note: This may not be the best way to do this. The ideal, I believe, would be to provide a web service that brings the information of the files stored on the FTP server. So you get information from the files is the web service and not the Android application (either via FTP connection or by reading the local files data if the application server that makes the web service available is on the same machine as FTP). A connection to FTP to download the file would only be made if you really needed to download it.

    
26.05.2014 / 15:30
0

I read your post, and I believe you should write a script that reads the files in / var / log from your linux server if it is the case, for example on my machine it stays in / var / log / proftpd, inside it has 2 files system.log and transfer.log, interpreting the text contained in these files can keep your users informed.

    
26.05.2014 / 15:27