README: add descriptiton of completeHandler method

This commit is contained in:
Kesha Antonov
2021-12-05 21:31:35 +03:00
parent d157726679
commit eb1c383337

View File

@@ -229,6 +229,11 @@ A class representing a download task created by `RNBackgroundDownloader.download
| `bytesWritten` | Number | The number of bytes currently written by the task |
| `totalBytes` | Number | The number bytes expected to be written by this task or more plainly, the file size being downloaded |
### `completeHandler(jobId)`
Finishes download job on iOS and informs OS that app can be closed in background if needed.
After finishing download in background you have some time to process your JS logic and finish the job.
### `Callback Methods`
Use these methods to stay updated on what's happening with the task.