Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to handle background operation when screen Rotation  RSS feed

 
sam liya
Ranch Hand
Posts: 1258
  • 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?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • 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.
 
If you try to please everybody, your progress is limited by the noisiest fool. And this tiny ad:
Thoughts on deprecation in Java
https://coderanch.com/t/683016/java/Deprecation-Java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!