Harinder
Harinder

Reputation: 11944

Does an AsyncTask stops when I close the application?

I want to upload files from phone to server for that I am using an AsyncTask. In case of large files if they are still uploding and the user closes the application will the upload stop i.e AsyncTask will end or continue till its complete?

Upvotes: 2

Views: 1398

Answers (2)

Vladimir Ivanov
Vladimir Ivanov

Reputation: 43098

It is recommended to use Service in case of large files.

Upvotes: 1

Gabriel Negut
Gabriel Negut

Reputation: 13960

The activity will continue to run even if the user switches to another application, unless you explicitly call finish() or the system kills your activity, in case of low resources.

Upvotes: 1

Related Questions