Android Question VB FilesSystemWatcher Equivalent

surfuric

Member
Licensed User
Longtime User
I have searched and do not think there is a built in equivalent to Visual Basic's FileSystemWatcher.

So I guess I will write a service which poles a directory every 5 minutes and checks for new files, then I can send the files to my ftp site.

But there will be thousands of files in the directory and listing them out and checking against a SQL database of known files every 5 minutes will certainly not be efficient.

Maybe limit File.ListFiles with File.LastModified in a loop? But that seems a waste of resources also.

Any suggestions how to do this and not destroy battery life?
 
Top