Pause and resume download of file using http/https


I am trying to download files using “angular-http-module”. But i want to pause and resume the download when ever required also i want to know the status of the download progress.

I am new to NativeScript( TS + Angular ).

Did i want to use any buildin/3rd-party plugin?

Please help me…


Hi Arvinth,
pause/resume downloads is no standard-functionality. So you will probably need to investigate deeper on this. I’d recommend to build a plain angular4 webapp app as a PoC first and then adopt your findings to NativeScript.

As a start, those StackOverflow articles might be of interest:

hope that helps, have fun :slight_smile:


The concept you are looking for is using Random Access Files. These do not exist out-of-the-box with NativeScript. You can read a little about what Xamarin is doing:

You are essentially skipping byte positions to read/write at different locations in a file stream. This allows you download byte chunks, stop and resume later, as long as you know the last write position in the file stream.

Depending on your skill level, you may be able to accomplish this. If you are more of a junior-leveled dev, I would recommend just allowing the user to “restart” the download process.

Background http plugin offers progress percentage:


Especially for iOS , i can use NSURLSession delegates for my above requirement so that i can call the delegate methods using the typescript. Is that possible? If so please give me some reference links…



I did more research and found this:

Which seems to be exactly what you are looking for.


Now that’s worth a bookmark. Might need it someday


@sean-perkins - IMHO think the the nativescript-background-http is only for upload. not for download.


Correct, upload only. The plugin I mention above is for download.