Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to handle background operation when screen Rotation  RSS feed

 
Ranch Hand
Posts: 1280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have app which download pdf from internet.So i am using AsyncTask to download file from Internet. When i rotate the phone normally Activity life cycle changes.So how to handle this with Background operation?
 
Rancher
Posts: 42975
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Either handle orientation changes yourself (android:configChanges in the manifest) instead of having Android handle it, or use the DownloadManager if it's HTTP.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!