Resumeable downloads
As per the discussion on the old issue tracker, the client should be able to deal with network interrupts by resuming downloads upon reconnection.
In order to do this, it should probably:
- Save the data it receives in a file such as ".apk-id.version-code.part" (e.g. like like how chromium distinguishes a file from a part of a file)
- On successful download, rename it to the actual desired filename
- On failure, finish writing whatever data is in the download buffer, and cleanly close the input streams and file.
- On attempted download, it should look for a relevant .part file, and if it exists, attempt to append to it
- The request to the server will need to include the relevant headers, based on the size of the .part file
Note that this should not be implemented until the refactoring of the downloaders is merged. This shouldn't take too long (as of April, progress is good).