Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4098538
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:18:54+00:00 2026-05-20T20:18:54+00:00

Hey guys, I could only find 1 thread on this, and it didn’t really

  • 0

Hey guys, I could only find 1 thread on this, and it didn’t really answer my question, so I’m asking for myself.

My application is downloading and parsing an rss file, and I’ve obviously decided to do this in a background task. I chose AsyncTask, and I’m trying to get it to start the download and then bring up the list view for the rss feed. From there I’d like the AsyncTask from the other activity to pass the now parsed information to the new list view activity as it loads it. I can’t figure out how to pass a reference to my AsyncTask object to my new activity without implementing parcelable and adding it to the bundle which would be a huge mess I think. Is there a better way to do this?

I’ve also seen other people recommend starting a service. What would be the advantages to doing it this way? Thanks!

~Scott

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T20:18:55+00:00Added an answer on May 20, 2026 at 8:18 pm

    This is exactly the case for using a service. An AsyncTask is for doing things on a UI thread (a convenience class really).

    What you are doing should go on in a service, because you don’t necessarily care about the UI thread since you are not going to be displaying in the same activity.

    Here is how you should go about doing this:

    1) create a service and do the processing of the RSS feed
    2) inside the service you should store your results in a database with the ContentResolver
    3) Have your ListAdapter in your ListActivity listen for changes on the same CONTENT_URI as your service is updating. This will automatically update your list as the rows get added or deleted, without any ANRs since it’s all on the background thread

    Some other advantages is that you can sync in the background without having your UI to be open at all. This could be very useful for a RSS application since you don’t always want to wait for a user to initiate a sync.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys, This could be a noob question, but I really can't find any
Hey guys, I can only apologise for asking such a noob question, but this
Hey guys, this question might be a little weird worded but I was looking
hey guys, i wonder how I could solve this in the best way: I
Hey guys, I want to store a categorized list of URLs. This is an
Hey guys, I have a question about Sphinx. I use Sphinx to index the
Hey guys, I've been bashing my head around for hours now, over this login
hey guys, i'm confused with this: forceAnim: <?php echo (is_singular() || $iphone) ? 0
Hey guys, unusual question: I have a input field #birthday that should accept european
hey guys, probably simple question for the most of you. I can't figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.