Howdy, I'm currentyl new to Java and Android but I would like to write an App which checks a webserver on a particular file. If that file is NEWER than the locally saved file it should go ahead and download the file.
Now I've alread开发者_开发百科y got the download in place .. but I don't know how I can check the file on the webserver. Any help would be appreciated! :)
Look into sending your request with an If-Modified-Since
header. This makes your request conditional based on the resource you are requesting. If it hasn't been updated since that time, it will return a 304.
See Section 14.25 of this page for more details.
精彩评论