Keyur Android
Keyur Android

Reputation: 395

Download video from AmazonS3 with ProgressBar in Android

Here i developed one application which download big size of videos from AmazonS3Bundle with HorizontalProgressBar but when i go to home screen by pressing home key and when i get back to my application's download screen, my download is restarting from beggining.

I want my application to keep downloading in background even if i go to any other application.

Upvotes: 0

Views: 104

Answers (1)

MKJParekh
MKJParekh

Reputation: 34301

That's because your Activity's onCreate() gets called everytime and the task to Download gets started again.

You should make one Service class to do the download task, So it will keep doing it in Background irrespect of the state of the Application.

Check these two examples : first and second link

Upvotes: 1

Related Questions