Sorry if I am asking again but I did not find any relevant information for this question.
Thanks in advance
Note: I am not in the activity, where I started downloading, the user can go back home, can start using some other app , But whenever it comes back, it will be notified with the update File download / progress progress
The best solution is to use the IntentService IntentService class to run an operation on a background thread. A provides a simple structure. This allows you to operate long-running operations without affecting the responsiveness of your user interface. In addition, an intent service is not affected by most user interaction lifecycle events, so an ASCink Task that is running in the circumstances will be closed
But there are some limitations of an intent service:
< Ul>However, in most cases the intent service is the most preferred method for conducting a plain background.
Note: If your app targets Android 5.0 (API level 21), then you should use Job Scheduler to run background services.
No comments:
Post a Comment